From 0c1dd101a86ed5a22dcb5d1e6e128728443cbf4b Mon Sep 17 00:00:00 2001 From: lxsang Date: Sat, 12 Nov 2016 17:46:13 +0100 Subject: [PATCH] add websocket support, remote terminal as example --- plugins/ws.c | 13 ------------- plugins/ws.h | 1 - 2 files changed, 14 deletions(-) diff --git a/plugins/ws.c b/plugins/ws.c index 2cb2bac..88f0773 100644 --- a/plugins/ws.c +++ b/plugins/ws.c @@ -183,17 +183,4 @@ void ws_close(int client, unsigned int status) bytes[1] = status & 0xFF; _send_header(client, header); send(client,bytes,2,0); -} -int ws_status(int client) -{ - fd_set sk; - FD_ZERO(&sk); - FD_SET(0, &sk); - FD_SET(client, &sk); - int result = select(client + 1, sk, NULL, NULL, NULL); - if(result == 1) - { - return FD_ISSET(client, &sk); - } - return result; } \ No newline at end of file diff --git a/plugins/ws.h b/plugins/ws.h index 1eb731c..3cc5825 100644 --- a/plugins/ws.h +++ b/plugins/ws.h @@ -24,5 +24,4 @@ void ws_b(int , uint8_t* data, int); void ws_close(int, unsigned int); void pong(int client, int len); int ws_read_data(int , ws_msg_header_t*, int, uint8_t*); -int ws_status(int); #endif \ No newline at end of file