ACKme Logo WiConnect Host Library- API Reference Guide
 
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
wiconnect::SocketInterface Class Reference

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 GPIO_IRQ_ARG)
 Connect to remote server. More...
 
WiconnectResult tcpConnect (WiconnectSocket &socket, const char *host, uint16_t remortPort GPIO_IRQ_ARG_NC)
 Connect to remote TCP server. More...
 
WiconnectResult tcpListen (uint16_t listeningPort, int maxClients=0 GPIO_IRQ_ARG_NC)
 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 GPIO_IRQ_ARG_NC)
 Connect to remote TLS server. More...
 
WiconnectResult udpConnect (WiconnectSocket &socket, const char *host, uint16_t remortPort, uint16_t localPort=SOCKET_ANY_PORT GPIO_IRQ_ARG_NC)
 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...
 

Detailed Description

The provides an interface for creating TCP/UDP/TLS/HTTP client sockets. A client socket connects to a remote server.

Note
This class is an interface to the Wiconnect class. It should never be independently instantiated or the parent of another class.

Definition at line 63 of file SocketInterface.h.


The documentation for this class was generated from the following file: