This function creates a socket.

Syntax

SOCKET SyncSocketSc(
  unsigned char u8Type, 
  unsigned char u8Flags
);

Parameters

u8Type
[in] Specify the socket type.
ValueDescription
SOCK_STREAM TCP
SOCK_DGRAM UDP
u8Flags
[in] Specify SOCKET_FLAGS_SSL for SSL communication and 0 for other cases.

Return value

The following values will be returned.
ValueDescription
0〜10 Socket descriptor
M2M_ERR_SLEEP_FAIL Initialize with SysWLANInit function.
Other than the above Failed

Remarks

Requirements

Header file:
lib.h
Library file:
libSTARTUPOPH5000.a

Last updated: 2020/10/14