iowfehu;gdbjwHJAOPIHO?L

Fork of X_NUCLEO_IDW01M1 by ST

Revision:
6:e7a3fca2df10
Parent:
5:c83ffd44f40a
Child:
7:0fdd186a7d90
--- a/SPWFInterface.h	Wed May 04 12:16:20 2016 +0000
+++ b/SPWFInterface.h	Mon May 09 10:38:22 2016 +0000
@@ -23,6 +23,7 @@
 #include "SpwfSADevice.h"
  
 #define SPWFSA_SOCKET_COUNT 8
+#define SERVER_SOCKET_NO    9
  
 /** SpwfSAInterface class
  *  Implementation of the NetworkStack for the SPWF Device
@@ -52,9 +53,9 @@
     virtual     int socket_open(void **handle, nsapi_protocol_t proto);    
     virtual     int socket_close(void *handle);    
     virtual     int socket_bind(void *handle, const SocketAddress &address);  //not supported  
-    virtual     int socket_listen(void *handle, int backlog);    //not supported
-    virtual     int socket_connect(void *handle, const SocketAddress &address);    
-    virtual     int socket_accept(void **handle, void *server);    //not supported
+    virtual     int socket_listen(void *handle, int backlog);
+    virtual     int socket_connect(void *handle, const SocketAddress &address);
+    virtual     int socket_accept(void **handle, void *server);
     virtual     int socket_send(void *handle, const void *data, unsigned size);  
     virtual     int socket_recv(void *handle, void *data, unsigned size);    
     virtual     int socket_sendto(void *handle, const SocketAddress &address, const void *data, unsigned size);    
@@ -62,10 +63,12 @@
     virtual     void socket_attach(void *handle, void (*callback)(void *), void *data);
            
 private:
-    int     init(void); 
+    int     init(void);
+    //int         get_network_socket(struct spwf_socket **handle);
         
     SpwfSADevice _spwf;
     bool _ids[SPWFSA_SOCKET_COUNT];
+    bool isListening;
     bool isInitialized;
     multimap <char *, vector <uint16_t> > c_table;