![]() |
WiConnect Host Library- API Reference Guide | ||
The provides an interface for creating TCP/UDP/TLS/HTTP client sockets. A client socket connects to a remote server. More...
#include <SocketInterface.h>
Inherited by wiconnect::Wiconnect.
Public Member Functions | |
WiconnectResult | closeAllSockets () |
Close all opened sockets. More... | |
WiconnectResult | connect (WiconnectSocket &socket, SocketType type, const char *host, uint16_t remortPort, uint16_t localPort, const void *args) |
Connect to remote server. More... | |
WiconnectResult | tcpConnect (WiconnectSocket &socket, const char *host, uint16_t remortPort) |
Connect to remote TCP server. More... | |
WiconnectResult | tcpListen (uint16_t listeningPort, int maxClients=0) |
Start internal TCP server and listen on specified port. More... | |
WiconnectResult | tcpAccept (WiconnectSocket &socket, uint32_t timeoutMs=WICONNECT_WAIT_FOREVER) |
Wait for next client to connect to TCP server. More... | |
WiconnectResult | tcpServerStop (void) |
Stop TCP server from listening on port. Close all connected clients. More... | |
WiconnectResult | tlsConnect (WiconnectSocket &socket, const char *host, uint16_t remortPort, const char *certFilename=NULL) |
Connect to remote TLS server. More... | |
WiconnectResult | udpConnect (WiconnectSocket &socket, const char *host, uint16_t remortPort, uint16_t localPort=SOCKET_ANY_PORT) |
Connect to remote UDP server. More... | |
WiconnectResult | udpListen (WiconnectUdpServer &udpServer, uint16_t listeningPort) |
Start a UDP server listening on the given port. More... | |
WiconnectResult | httpConnect (WiconnectSocket &socket, const char *url, const HttpSocketArgs *args) |
Connect to remote HTTP server. More... | |
WiconnectResult | httpGet (WiconnectSocket &socket, const char *url, bool openOnly=false, const char *certFilename=NULL) |
Issue HTTP GET Request. More... | |
WiconnectResult | httpPost (WiconnectSocket &socket, const char *url, const char *contextType, bool openOnly=true, const char *certFilename=NULL) |
Issue HTTP POST Request. More... | |
WiconnectResult | httpHead (WiconnectSocket &socket, const char *url, const char *certFilename=NULL) |
Issue HTTP HEAD Request. More... | |
WiconnectResult | httpAddHeader (WiconnectSocket &socket, const char *key, const char *value) |
Add HTTP header key/value pair to opened HTTP request. More... | |
WiconnectResult | httpGetStatus (WiconnectSocket &socket, uint32_t *statusCodePtr) |
Get the HTTP status code from HTTP request. More... | |
The provides an interface for creating TCP/UDP/TLS/HTTP client sockets. A client socket connects to a remote server.
Definition at line 63 of file SocketInterface.h.