Lines Matching full:socket
5 * @defgroup socket Socket API
7 * BSD-style socket API.\n
10 * Header is in posix/sys/socket.h\b
193 * select on the same socket...
204 /** Contains all internal pointers and states used for a socket */
206 /** sockets currently are built on netconns, each socket has one netconn */
218 /** error happened for this socket, set by event_callback(), tested by select */
220 /** last error that occurred on this socket (in fact, all our errnos fit into an u8_t) */
222 /** counter of how many threads are waiting for this socket using select */
270 /* Define the number of IPv4 multicast memberships, default is one per socket */
276 a socket is closed */
278 /** the socket */
353 * Map a externally used socket index to the internal socket representation.
355 * @param s externally used socket index
356 * @return struct lwip_sock for the socket or NULL if not found
385 * @param s externally used socket index
386 * @return struct lwip_sock for the socket or NULL if not found
404 * @param s externally used socket index
405 * @return struct lwip_sock for the socket or NULL if not found
414 * Allocate a new socket for a given netconn.
416 * @param newconn the netconn for which to allocate a socket
417 * @param accepted 1 if socket has been created by accept(),
418 * 0 if socket has been created by socket()
419 * @return the index of the new socket; -1 on error
427 /* allocate a new socket identifier */ in alloc_socket()
429 /* Protect socket array */ in alloc_socket()
433 /* The socket is not yet known to anyone, so no need to protect in alloc_socket()
439 /* TCP sendbuf is empty, but the socket is not yet writable until connected in alloc_socket()
454 /** Free a socket. The socket's netconn must have been
457 * @param sock the socket to free
470 /* Protect socket array */ in free_socket()
483 /* Below this, the well-known socket functions are implemented.
533 …LWIP_ASSERT("invalid socket index", (newsock >= LWIP_SOCKET_OFFSET) && (newsock < NUM_SOCKETS + LW… in lwip_accept()
538 * though the server task might not have created a new socket yet. in lwip_accept()
539 * In that case, newconn->socket is counted down (newconn->socket--), in lwip_accept()
543 nsock->rcvevent += (s16_t)(-1 - newconn->socket); in lwip_accept()
544 newconn->socket = newsock; in lwip_accept()
594 /* sockaddr does not match socket type (IPv4/IPv6) */ in lwip_bind()
679 /* sockaddr does not match socket type (IPv4/IPv6) */ in lwip_connect()
725 * Set a socket into listen mode.
726 * The socket may not have been used for another connection previously.
728 * @param s the socket to set to listening mode
915 /* If this is a TCP socket, check if there is data left in the in lwip_recvfrom()
1286 conn->socket = i; in lwip_socket()
1316 * Go through the readset and writeset lists and see which socket of the sockets
1320 * @param maxfdp1 the highest socket index in the sets
1342 /* Go through each socket in each list to count number of sockets which in lwip_selscan()
1351 /* First get the socket's status (protected)... */ in lwip_selscan()
1362 /* See if netconn of this socket is ready for read */ in lwip_selscan()
1368 /* See if netconn of this socket is ready for write */ in lwip_selscan()
1374 /* See if netconn of this socket had an error */ in lwip_selscan()
1415 /* Go through each socket in each list to count number of sockets which in lwip_select()
1464 /* Increase select_waiting for each socket we are interested in */ in lwip_select()
1477 /* Not a valid socket */ in lwip_select()
1511 /* Decrease select_waiting for each socket we are interested in */ in lwip_select()
1526 /* Not a valid socket */ in lwip_select()
1558 /* This happens when a socket got closed while waiting */ in lwip_select()
1591 * Callback registered in the netconn layer for each socket-netconn.
1605 /* Get socket */ in event_callback()
1607 s = conn->socket; in event_callback()
1610 * the server task might not have created a new socket yet. in event_callback()
1613 * can happen before the new socket is set up. */ in event_callback()
1615 if (conn->socket < 0) { in event_callback()
1617 conn->socket--; in event_callback()
1622 s = conn->socket; in event_callback()
1658 /* noone is waiting for this socket, no need to check select_cb_list */ in event_callback()
1663 /* Now decide if anyone is waiting for this socket */ in event_callback()
1676 /* Test this select call for our socket */ in event_callback()
1963 default: /* unrecognized socket type */ in lwip_getsockopt_impl()
1966 ("lwip_getsockopt(%d, SOL_SOCKET, SO_TYPE): unrecognized socket type %d\n", in lwip_getsockopt_impl()
2163 /* If this is no UDP lite socket, ignore any options. */ in lwip_getsockopt_impl()
2450 /* If this is a TCP or a RAW socket, ignore these options. */ in lwip_setsockopt_impl()
2451 /* @todo: assign membership to this socket so that it is dropped when closing the socket */ in lwip_setsockopt_impl()
2563 /* If this is no UDP lite socket, ignore any options. */ in lwip_setsockopt_impl()
2686 /* we come here if either LWIP_FIONREAD_LINUXMODE==0 or this is a TCP socket */ in lwip_ioctl()
2769 /** Register a new IGMP membership. On socket close, the membership is dropped automatically.
2797 * on socket close.
2823 /** Drop all memberships of a socket that were not dropped explicitly via setsockopt.