Rtos API example
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) |
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 Sun Jul 17 2022 08:25:36 by 1.7.2