6.2.4 Summary
The following table summarizes the ATWINC15x0 socket API and shows its compatibility with BSD socket APIs.
BSD API | ATWINC15x0 API | ATWINC15x0 API Type | Server/Client | TCP/UDP | Brief |
---|---|---|---|---|---|
socket | socket | Synchronous | Both | Both | Creates a new socket. |
connect | connect | Asynchronous | Client | TCP | Initializes a TCP connection request to a remote server. |
bind | bind | Asynchronous | Server | Both | Binds a socket to an address (address/port). |
listen | listen | Asynchronous | Server | TCP | Allows a bound socket to listen to remote connections for its local port. |
accept | accept | Deprecated, Implicit accept in listen. | |||
send | send | Asynchronous | Both | Both | Sends packet. |
sendto | sendto | Asynchronous | Both | UDP | Sends packet over UDP sockets. |
write | - | Not supported | |||
recv | recv | Asynchronous | Both | Both | Receives packet. |
recvfrom | recvfrom | Asynchronous | Both | Both | Receives packet. |
read | - | Not supported | |||
close | close | Synchronous | Both | Both | Terminates the TCP connection and release system resources. |
gethostbyname | gethostbyname | Asynchronous | Both | Both | Gets the IP address of a certain host name |
gethostbyaddr | - | Not supported | |||
select | - | Not supported | |||
poll | - | Not supported | |||
setsockopt | setsockopt | Synchronous | Both | Both | Sets socket option. |
getsockopt | Not supported | ||||
htons/ntohs | _htons/_ntohs | Synchronous | Both | Both | Converts 2 byte integer from the host representation to the Network byte order representation (and vice versa). |
htonl/ntohl21 | _htonl/_ntohl | Synchronous | Both | Both | Converts 4 byte integer from the host representation to the Network byte order representation (and vice versa). |