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

Revision:
39:a963f69cb2de
Parent:
29:b6af04b77a56
--- a/api/SocketInterface.h	Thu Nov 27 10:27:18 2014 +0000
+++ b/api/SocketInterface.h	Mon Feb 23 20:30:18 2015 -0800
@@ -352,6 +352,17 @@
      */
     WiconnectResult httpGetStatus(WiconnectSocket &socket, uint32_t *statusCodePtr);
 
+    /**
+     * @ingroup api_socket_http
+     *
+     * @brief Wait for next HTTP Server WebSocket to connect
+     *
+     * @param[in] socket Socket to connected websocket
+     * @param[in] timeoutMs Optional, specifiy maximum amount of time in ms to wait for a client
+     * @return Result of method. See @ref WiconnectResult
+     */
+    WiconnectResult httpAcceptWebSocket(WiconnectSocket &socket, uint32_t timeoutMs = WICONNECT_WAIT_FOREVER);
+
 protected:
     SocketInterface(Wiconnect *wiconnect);
     ~SocketInterface();
@@ -361,8 +372,9 @@
 #endif
 
     uint32_t serverConnectedClientList;
+    uint32_t websocketConnectedList;
 
-    WiconnectResult pollForServerClient(uint8_t *handle = NULL, uint16_t *localPort = NULL, uint16_t *remotePort = NULL, uint32_t *ipAddress = NULL);
+    WiconnectResult pollForClient(SocketType type, uint8_t *handle = NULL, uint16_t *localPort = NULL, uint16_t *remotePort = NULL, uint32_t *ipAddress = NULL);
 
     void socketClosedCallback(const WiconnectSocket *socket);