Lines Matching full:socket

63 /** Contains all internal pointers and states used for a socket */
65 /** sockets currently are built on netconns, each socket has one netconn */
77 /** error happened for this socket, set by event_callback(), tested by select */
79 /** last error that occurred on this socket */
81 /** counter of how many threads are waiting for this socket using select */
106 /** socket struct for which to change options */
109 /** socket index for which to change options */
133 /** Table to quickly map an lwIP error (err_t) to a socket error
189 * Map a externally used socket index to the internal socket representation.
191 * @param s externally used socket index
192 * @return struct lwip_sock for the socket or NULL if not found
219 * @param s externally used socket index
220 * @return struct lwip_sock for the socket or NULL if not found
237 * @param s externally used socket index
238 * @return struct lwip_sock for the socket or NULL if not found
247 * Allocate a new socket for a given netconn.
249 * @param newconn the netconn for which to allocate a socket
250 * @param accepted 1 if socket has been created by accept(),
251 * 0 if socket has been created by socket()
252 * @return the index of the new socket; -1 on error
260 /* allocate a new socket identifier */ in alloc_socket()
262 /* Protect socket array */ in alloc_socket()
266 /* The socket is not yet known to anyone, so no need to protect in alloc_socket()
272 /* TCP sendbuf is empty, but the socket is not yet writable until connected in alloc_socket()
285 /** Free a socket. The socket's netconn must have been
288 * @param sock the socket to free
302 /* Protect socket array */ in free_socket()
317 /* Below this, the well-known socket functions are implemented.
394 LWIP_ASSERT("invalid socket index", (newsock >= 0) && (newsock < NUM_SOCKETS)); in lwip_accept()
395 /* RT-Thread has changed callback when using BSD socket API, so remove this assert. */ in lwip_accept()
400 * though the server task might not have created a new socket yet. in lwip_accept()
401 * In that case, newconn->socket is counted down (newconn->socket--), in lwip_accept()
405 nsock->rcvevent += (s16_t)(-1 - newconn->socket); in lwip_accept()
406 newconn->socket = newsock; in lwip_accept()
530 * Set a socket into listen mode.
531 * The socket may not have been used for another connection previously.
533 * @param s the socket to set to listening mode
726 /* If this is a TCP socket, check if there is data left in the in lwip_recvfrom()
1010 conn->socket = i;
1023 * Go through the readset and writeset lists and see which socket of the sockets
1029 * @param maxfdp1 the highest socket index in the sets
1051 /* Go through each socket in each list to count number of sockets which
1058 /* First get the socket's status (protected)... */
1069 /* See if netconn of this socket is ready for read */
1075 /* See if netconn of this socket is ready for write */
1081 /* See if netconn of this socket had an error */
1118 /* Go through each socket in each list to count number of sockets which
1164 /* Increase select_waiting for each socket we are interested in */
1196 /* Increase select_waiting for each socket we are interested in */
1256 * Callback registered in the netconn layer for each socket-netconn.
1270 /* Get socket */
1272 s = conn->socket;
1275 * the server task might not have created a new socket yet.
1278 * can happen before the new socket is set up. */
1280 if (conn->socket < 0) {
1282 conn->socket--;
1287 s = conn->socket;
1323 /* noone is waiting for this socket, no need to check select_cb_list */
1328 /* Now decide if anyone is waiting for this socket */
1339 /* Test this select call for our socket */
1589 /* If this is no TCP socket, ignore any options. */
1618 /* If this is no UDP lite socket, ignore any options. */
1723 default: /* unrecognized socket type */
1726 ("lwip_getsockopt(%d, SOL_SOCKET, SO_TYPE): unrecognized socket type %d\n",
2006 /* If this is no TCP socket, ignore any options. */
2035 /* If this is no UDP lite socket, ignore any options. */
2191 /* If this is a TCP or a RAW socket, ignore these options. */