146 Star 285 Fork 1.5K

OpenHarmony/communication_dsoftbus

 / 详情

【架构看护优化】BaseListener 异步接口输入输出无法对应,接口定义不佳导致性能问题

已完成
缺陷
创建于  
2022-07-07 18:25

【模块名_概率】简要描述:
core/connection/interface/softbus_base_listener.h
中定义BaseListener输入使用 moduleId/listenerId为标识(实际都是ListenerModule), 输出的onConnectEvent 和 onDataEvent却不带 moduleId。 导致业务无法精确匹配,数据处理冗余,且性能不佳

typedef struct {
    int32_t (*onConnectEvent)(int32_t events, int32_t cfd, const ConnectOption *clientAddr);
    int32_t (*onDataEvent)(int32_t events, int32_t fd);
} SoftbusBaseListener;


uint32_t CreateListenerModule(void);
void ReleaseListenerModule(uint32_t ListenerId);

int32_t GetSoftbusBaseListener(uint32_t listenerId, SoftbusBaseListener *listener);
int32_t StartBaseClient(uint32_t listenerId);
int32_t StartBaseListener(uint32_t listenerId, const LocalListenerInfo *info, const SoftbusBaseListener *listener);
int32_t StopBaseListener(uint32_t listenerId);
void ResetBaseListener(uint32_t module);
void ResetBaseListenerSet(uint32_t module);
void DestroyBaseListener(uint32_t module);

int32_t AddTrigger(uint32_t module, int32_t fd, TriggerType triggerType);
int32_t DelTrigger(uint32_t module, int32_t fd, TriggerType triggerType);

【环境信息】:
不涉及

【预置条件】:

【测试步骤】:

【预期结果】:

【实际结果】:

【恢复手段】:

【出现概率】:问题出现次数/实际测试次数

【定位信息】:

    1. Log、截图、多媒体文件等,所有和问题有关的信息:

评论 (1)

duxbbo 创建了缺陷 3年前
duxbbo 任务状态待办的 修改为修复中 3年前
duxbbo 修改了描述 3年前
duxbbo 修改了标题 3年前
zianed 里程碑设置为IT4_OpenHarmony 3.1(Release) 3年前
zianed 负责人duxbbo 修改为Yanying 3年前
Yanying 添加协作者Yanying 3年前
Yanying 负责人Yanying 修改为zhangshen 3年前
Yanying 取消协作者Yanying 3年前
展开全部操作日志
zhangshen 任务状态修复中 修改为已完成 3年前

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(2)
zhangshen-breakfei1 duxbbo-duxbbo
1
https://gitee.com/openharmony/communication_dsoftbus.git
git@gitee.com:openharmony/communication_dsoftbus.git
openharmony
communication_dsoftbus
communication_dsoftbus

搜索帮助