31 #include "Wiconnect.h"
32 #include "types/WiconnectSocket.h"
33 #include "types/WiconnectUdpServer.h"
35 #ifdef WICONNECT_GPIO_IRQ_ENABLED
36 #include "types/SocketIrqHandlerMap.h"
44 #ifdef WICONNECT_GPIO_IRQ_ENABLED
45 #define GPIO_IRQ_ARG_NC ,Pin irqPin = PIN_NC
46 #define GPIO_IRQ_ARG ,Pin irqPin
47 #define GPIO_IRQ_PARAM ,irqPin
49 #define GPIO_IRQ_ARG_NC
51 #define GPIO_IRQ_PARAM
79 #ifdef WICONNECT_GPIO_IRQ_ENABLED
359 #ifdef WICONNECT_GPIO_IRQ_ENABLED
360 SocketIrqHandlerMap irqHandlers;
363 uint32_t serverConnectedClientList;
365 WiconnectResult pollForServerClient(uint8_t *handle = NULL, uint16_t *localPort = NULL, uint16_t *remotePort = NULL, uint32_t *ipAddress = NULL);
WiconnectResult httpPost(WiconnectSocket &socket, const char *url, const char *contextType, bool openOnly=true, const char *certFilename=NULL)
Issue HTTP POST Request.
UDP Server Listening socket.
WiconnectResult udpConnect(WiconnectSocket &socket, const char *host, uint16_t remortPort, uint16_t localPort=SOCKET_ANY_PORT)
Connect to remote UDP server.
WiconnectResult
API Result code.
Generic callback function.
WiconnectResult connect(WiconnectSocket &socket, SocketType type, const char *host, uint16_t remortPort, uint16_t localPort, const void *args)
Connect to remote server.
WiconnectResult tcpConnect(WiconnectSocket &socket, const char *host, uint16_t remortPort)
Connect to remote TCP server.
WiconnectResult tcpListen(uint16_t listeningPort, int maxClients=0)
Start internal TCP server and listen on specified port.
The provides an interface for http://goHACK.me.
#define SOCKET_ANY_PORT
Default which indicates to use the most optimal port.
WiconnectResult tlsConnect(WiconnectSocket &socket, const char *host, uint16_t remortPort, const char *certFilename=NULL)
Connect to remote TLS server.
WiconnectResult httpAddHeader(WiconnectSocket &socket, const char *key, const char *value)
Add HTTP header key/value pair to opened HTTP request.
WiconnectResult closeAllSockets()
Close all opened sockets.
WiconnectResult httpConnect(WiconnectSocket &socket, const char *url, const HttpSocketArgs *args)
Connect to remote HTTP server.
PinName Pin
Pin name on HOST.
WiconnectResult httpGet(WiconnectSocket &socket, const char *url, bool openOnly=false, const char *certFilename=NULL)
Issue HTTP GET Request.
WiconnectResult tcpAccept(WiconnectSocket &socket, uint32_t timeoutMs=WICONNECT_WAIT_FOREVER)
Wait for next client to connect to TCP server.
WiconnectResult httpHead(WiconnectSocket &socket, const char *url, const char *certFilename=NULL)
Issue HTTP HEAD Request.
Connection object to remote server.
#define WICONNECT_WAIT_FOREVER
Never timeout.
The provides an interface for creating TCP/UDP/TLS/HTTP client sockets. A client socket connects to a...
WiconnectResult tcpServerStop(void)
Stop TCP server from listening on port. Close all connected clients.
The root WiConnect library class. This class inheriets all WiConnect functionality.
WiconnectResult udpListen(WiconnectUdpServer &udpServer, uint16_t listeningPort)
Start a UDP server listening on the given port.
Struct for hold HTTP socket configuration.
WiconnectResult httpGetStatus(WiconnectSocket &socket, uint32_t *statusCodePtr)
Get the HTTP status code from HTTP request.