Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
sockets.h File Reference
Socket API (to be used from non-TCPIP threads) More...
Go to the source code of this file.
Data Structures | |
struct | sockaddr_in |
IPv4 Socket address structure. More... | |
struct | sockaddr_in6 |
IPv6 Socket address structure. More... | |
struct | sockaddr |
Socket address structure. More... | |
struct | lwip_setgetsockopt_data |
This struct is used to pass data to the set/getsockopt_internal functions running in tcpip_thread context (only a void* is allowed) More... | |
struct | linger |
This structure is used for the SO_LINGER option. More... | |
struct | ip_mreq |
IPv4 multicast group information. More... | |
Functions | |
void | lwip_socket_thread_init (void) |
LWIP_NETCONN_SEM_PER_THREAD==1: initialize thread-local semaphore. | |
void | lwip_socket_thread_cleanup (void) |
LWIP_NETCONN_SEM_PER_THREAD==1: destroy thread-local semaphore. | |
int | lwip_shutdown (int s, int how) |
Close one end of a full-duplex connection. | |
int | lwip_listen (int s, int backlog) |
Set a socket into listen mode. | |
int | lwip_fcntl (int s, int cmd, int val) |
A minimal implementation of fcntl. |
Detailed Description
Socket API (to be used from non-TCPIP threads)
Definition in file sockets.h.
Function Documentation
int lwip_fcntl | ( | int | s, |
int | cmd, | ||
int | val | ||
) |
A minimal implementation of fcntl.
Currently only the commands F_GETFL and F_SETFL are implemented. Only the flag O_NONBLOCK is implemented.
Definition at line 2712 of file lwip_sockets.c.
int lwip_listen | ( | int | s, |
int | backlog | ||
) |
Set a socket into listen mode.
The socket may not have been used for another connection previously.
- Parameters:
-
s the socket to set to listening mode backlog (ATTENTION: needs TCP_LISTEN_BACKLOG=1)
- Returns:
- 0 on success, non-zero on failure
Definition at line 709 of file lwip_sockets.c.
int lwip_shutdown | ( | int | s, |
int | how | ||
) |
Close one end of a full-duplex connection.
Definition at line 1691 of file lwip_sockets.c.
void lwip_socket_thread_cleanup | ( | void | ) |
LWIP_NETCONN_SEM_PER_THREAD==1: destroy thread-local semaphore.
Definition at line 338 of file lwip_sockets.c.
void lwip_socket_thread_init | ( | void | ) |
LWIP_NETCONN_SEM_PER_THREAD==1: initialize thread-local semaphore.
Definition at line 331 of file lwip_sockets.c.
Generated on Tue Jul 12 2022 18:18:59 by
