Syntax
SOCKET SocketSc(
unsigned short u16Domain,
unsigned char u8Type,
unsigned char u8Flags
);
Parameters
- u16Domain
- [in] Please specify AF_INET. (Other domains are not supported)
- u8Type
- [in] Specify the socket type.
Value Description 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.Value | Description |
---|---|
-1 | Failed |
0〜10 | Socket descriptor |
M2M_ERR_SLEEP_FAIL | Initialize with SysWLANInit function. |
Remarks
Generate a socket.Requirements
Header file:
lib.hLibrary file:
libSTARTUPOPH5000.a
Sample
Last updated: 2020/11/26