1.3.3.26 SYS_NET_CtrlMsg Function
C
int32_t SYS_NET_CtrlMsg(SYS_MODULE_OBJ obj, SYS_NET_CTRL_MSG msg_type, void *data, uint16_t len)
Summary
Returns success/ failure for the disconnect/ reconnect operation asked by the user.
Description
This function is used for disconnecting or reconnecting to the peer.
Precondition
SYS_NET_Open should have been called.
Parameters
obj - SYS NET object handle, returned from SYS_NET_Open | Param | Description | |:----- |:----------- |
| msg_type | valid Msg Type SYS_NET_CTRL_MSG | | data - valid data buffer pointer based on the Msg Type | NULL for DISCONNECT, Pointer to SYS_NET_Config for RECONNECT len - length of the data buffer the pointer is pointing to
Returns
SYS_NET_SUCCESS - Indicates that the Request was catered to successfully
SYS_NET_FAILURE - Indicates that the Request failed
Example
// Handle "objSysNet" value must have been returned from SYS_NET_Open.
if( SYS_NET_CtrlMsg(objSysNet, SYS_NET_CTRL_MSG_DISCONNECT, NULL, 0) == SYS_NET_SUCCESS)
{
}
Remarks
None.