1.3.3.29 SYS_NET_SendMsg Function

C

int32_t SYS_NET_SendMsg(SYS_MODULE_OBJ obj, uint8_t *buffer, uint16_t len)

Summary

Returns No of Bytes sent to peer using the System NET instance.

Description

This function returns the number of bytes transmitted to the peer.

Precondition

SYS_NET_Open should have been called.

Parameters

object - SYS NET object handle, returned from SYS_NET_Open data - valid data buffer pointer len - length of the data to be transmitted

Returns

SYS_NET_SERVICE_DOWN - Indicates that the System NET instance is not connected to the peer

SYS_NET_PUT_NOT_READY - Indicates that the System NET instance Put is NOT ready

SYS_NET_PUT_BUFFER_NOT_ENOUGH - Indicates that the System NET instance cannot transmit as the available buffer is less than the bytes to be transmitted

Positive Non-Zero - Indicates the number of bytes transmitted to the peer

Example

// Handle "objSysNet" value must have been returned from SYS_NET_Open.
while(SYS_NET_SendMsg(objSysNet, "hello", 5) <= 0);

Remarks

None.