Host library for controlling a WiConnect enabled Wi-Fi module.
Dependents: wiconnect-ota_example wiconnect-web_setup_example wiconnect-test-console wiconnect-tcp_server_example ... more
TCP methods. More...
Functions | |
WiconnectResult | tcpConnect (WiconnectSocket &socket, const char *host, uint16_t remortPort GPIO_IRQ_ARG_NC) |
Connect to remote TCP server. | |
WiconnectResult | tcpListen (uint16_t listeningPort, int maxClients=0 GPIO_IRQ_ARG_NC) |
Start internal TCP server and listen on specified port. | |
WiconnectResult | tcpAccept (WiconnectSocket &socket, uint32_t timeoutMs=WICONNECT_WAIT_FOREVER) |
Wait for next client to connect to TCP server. | |
WiconnectResult | tcpServerStop (void) |
Stop TCP server from listening on port. |
Detailed Description
TCP methods.
Function Documentation
WiconnectResult tcpAccept | ( | WiconnectSocket & | socket, |
uint32_t | timeoutMs = WICONNECT_WAIT_FOREVER |
||
) | [inherited] |
Wait for next client to connect to TCP server.
- Parameters:
-
[in] socket Socket to connected client [in] timeoutMs Optional, specifiy maximum amount of time in ms to wait for a client
- Returns:
- Result of method. See WiconnectResult
WiconnectResult tcpConnect | ( | WiconnectSocket & | socket, |
const char * | host, | ||
uint16_t remortPort | GPIO_IRQ_ARG_NC | ||
) | [inherited] |
Connect to remote TCP server.
- Parameters:
-
[out] socket TCP WiconnectSocket object of opened connection. [in] host The host/IP address of the remote TCP server [in] remortPort The port of the remote server [in] irqPin Optional, Data available external interrupt pin. See registerSocketIrqHandler() for more info
- Returns:
- Result of method. See WiconnectResult
WiconnectResult tcpListen | ( | uint16_t | listeningPort, |
int | maxClients = 0 GPIO_IRQ_ARG_NC |
||
) | [inherited] |
Start internal TCP server and listen on specified port.
- Parameters:
-
[in] listeningPort The local port the server should listen on [in] maxClients Optional, the maximum simultaneous connected clients, 0 is default, 1-8 valid range [in] irqPin Optional, Data available external interrupt pin. See registerSocketIrqHandler() for more info
- Returns:
- Result of method. See WiconnectResult
WiconnectResult tcpServerStop | ( | void | ) | [inherited] |
Stop TCP server from listening on port.
Close all connected clients.
- Returns:
- Result of method. See WiconnectResult
Generated on Tue Jul 12 2022 17:35:59 by 1.7.2