佚名通过本文主要向大家介绍了mtk,mtk手机网,mtk刷机工具,mtk驱动,mtk手机等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: MTK 非MMI task怎么收到MSG_ID_APP_SOC_NOTIFY_IND(socket 通知信号)?
描述:
在mmi下可以通过SetProtocolEventHandler(sunoo_socket_notify, MSG_ID_APP_SOC_NOTIFY_IND);来设置回调,但是SetProtocolEventHandler()只能在mmi下使用,因为这是mmi层自己封装的函数。
在头文件 soc_sap.h 是这么说的:
MSG_ID_APP_SOC_NOTIFY_IND, /* Notification to application for some events,
e.g., socket is readable, socket is connected,
etc. In case of TCP half-write close by peer,
event_type will be SOC_CLOSE and error_cause
will be SOC_CONNRESET.
P.S. if application wants to accept this primitive,
it should run in its own task instead of a task containing
multiple applications, such as MMI. However, if application
wants to run in the task of MMI and also wants to receive this primitive,
it should use the "framework multiple protocol event handler" (since 08B).
Otherwise, the primitive may be received by other applications running in
the same task as you.
Direction: SOC -> APP
Local parameter: app_soc_notify_ind_struct
Peer buffer: None
*/
描述:
MTK tasksocket
我想在MTK 功能机上添加一个task,用于和server通信,怎么才能收到socket 的通知?在mmi下可以通过SetProtocolEventHandler(sunoo_socket_notify, MSG_ID_APP_SOC_NOTIFY_IND);来设置回调,但是SetProtocolEventHandler()只能在mmi下使用,因为这是mmi层自己封装的函数。
在头文件 soc_sap.h 是这么说的:
MSG_ID_APP_SOC_NOTIFY_IND, /* Notification to application for some events,
e.g., socket is readable, socket is connected,
etc. In case of TCP half-write close by peer,
event_type will be SOC_CLOSE and error_cause
will be SOC_CONNRESET.
P.S. if application wants to accept this primitive,
it should run in its own task instead of a task containing
multiple applications, such as MMI. However, if application
wants to run in the task of MMI and also wants to receive this primitive,
it should use the "framework multiple protocol event handler" (since 08B).
Otherwise, the primitive may be received by other applications running in
the same task as you.
Direction: SOC -> APP
Local parameter: app_soc_notify_ind_struct
Peer buffer: None
*/