diff options
Diffstat (limited to 'firmwares/wifishield/wifiHD/src/ard_tcp.h')
-rw-r--r-- | firmwares/wifishield/wifiHD/src/ard_tcp.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/firmwares/wifishield/wifiHD/src/ard_tcp.h b/firmwares/wifishield/wifiHD/src/ard_tcp.h index 7d0bf7b..2bd3731 100644 --- a/firmwares/wifishield/wifiHD/src/ard_tcp.h +++ b/firmwares/wifishield/wifiHD/src/ard_tcp.h @@ -24,7 +24,9 @@ typedef void (ard_tcp_done_cb_t)(void *opaque, int result); // Maximum number of client connection accepted by server #define MAX_CLIENT_ACCEPTED 4 #define NO_VALID_ID -1 -#define GET_FIRST_CLIENT_TCP(TTCP) ((TTCP!=NULL)?TTCP->tpcb[0] : NULL) + +#define GET_FIRST_CLIENT_TCP(TTCP) getFirstClient(TTCP, 1) +#define GET_FIRST_CLIENT_TCP_NV(TTCP) getFirstClient(TTCP, 0) #define GET_CLIENT_TCP(TTCP,ID) (((TTCP!=NULL)&&(ID>=0)&&(ID<MAX_CLIENT_ACCEPTED))?TTCP->tpcb[ID] : NULL) @@ -92,6 +94,10 @@ bool cleanNewClientConn(struct ttcp* _ttcp); int8_t getNewClientConnId(struct ttcp* _ttcp, struct tcp_pcb *newpcb); +int8_t getCurrClientConnId(); + +struct tcp_pcb * getFirstClient(struct ttcp* _ttcp, bool verbose); + void closeConnections(); #endif |