1
0
mirror of https://github.com/lxsang/ant-http synced 2024-07-01 12:59:47 +02:00

add websocket support, remote terminal as example

This commit is contained in:
lxsang 2016-11-12 17:46:13 +01:00
parent eb63cd0fa4
commit 0c1dd101a8
2 changed files with 0 additions and 14 deletions

View File

@ -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;
}

View File

@ -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