6.2.4 Summary

The following table summarizes the ATWINC15x0 socket API and shows its compatibility with BSD socket APIs.

Table 6-1. ATWINC15x0 Socket API Summary
BSD APIATWINC15x0 APIATWINC15x0 API TypeServer/ClientTCP/UDPBrief
socketsocketSynchronousBothBothCreates a new socket.
connectconnectAsynchronousClientTCP Initializes a TCP connection request to a remote server.
bindbindAsynchronousServerBothBinds a socket to an address (address/port).
listenlistenAsynchronousServerTCPAllows a bound socket to listen to remote connections for its local port.
acceptaccept Deprecated, Implicit accept in listen.
sendsendAsynchronousBothBothSends packet.
sendtosendtoAsynchronousBothUDPSends packet over UDP sockets.
write- Not supported
recvrecvAsynchronousBothBothReceives packet.
recvfromrecvfromAsynchronousBothBothReceives packet.
read- Not supported
closecloseSynchronousBothBothTerminates the TCP connection and release system resources.
gethostbynamegethostbynameAsynchronousBothBothGets the IP address of a certain host name
gethostbyaddr- Not supported
select- Not supported
poll- Not supported
setsockoptsetsockoptSynchronousBothBothSets socket option.
getsockopt Not supported
htons/ntohs_htons/_ntohsSynchronousBothBothConverts 2 byte integer from the host representation to the Network byte order representation (and vice versa).
htonl/ntohl21_htonl/_ntohlSynchronousBothBothConverts 4 byte integer from the host representation to the Network byte order representation (and vice versa).