![]() |
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 | registerSocketIrqHandler (Pin irqPin, const Callback &handler) |
Register a host pin as an external interrupt. When the external interrupt is triggered, the supplied callback is executed. More... | |
WiconnectResult | unregisterSocketIrqHandler (Pin irqPin) |
Unregister a previously registered IRQ pin. More... | |
WiconnectResult | connect (WiconnectSocket &socket, SocketType type, const char *host, uint16_t remortPort, uint16_t localPort, const void *args, Pin irqPin) |
Connect to remote server. More... | |
WiconnectResult | tcpConnect (WiconnectSocket &socket, const char *host, uint16_t remortPort, Pin irqPin=PIN_NC) |
Connect to remote TCP server. More... | |
WiconnectResult | tcpListen (uint16_t listeningPort, int maxClients=0, Pin irqPin=PIN_NC) |
Start internal TCP server and listen on specified port. More... | |
WiconnectResult | tcpAccept (WiconnectSocket &socket, int 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, Pin irqPin=PIN_NC) |
Connect to remote TLS server. More... | |
WiconnectResult | udpConnect (WiconnectSocket &socket, const char *host, uint16_t remortPort, uint16_t localPort=SOCKET_ANY_PORT, Pin irqPin=PIN_NC) |
Connect to remote UDP server. 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 51 of file SocketInterface.h.