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.
Dependents: mbed-os-example-blinky-gr-lychee GR-Boads_Camera_sample GR-Boards_Audio_Recoder GR-Boads_Camera_DisplayApp ... more
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 | 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... | |
| 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) | 
| Unimplemented: 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 2706 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 710 of file lwip_sockets.c.
| int lwip_shutdown | ( | int | s, | 
| int | how | ||
| ) | 
Unimplemented: Close one end of a full-duplex connection.
Currently, the full connection is closed.
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 11:02:37 by
 1.7.2
 1.7.2