1
0
mirror of https://github.com/lammertb/libhttp.git synced 2025-07-29 21:01:13 +03:00

Handler for websocket connection (Step 2/?)

Add an interface to register handler for websocket connections.
See enhancement #30 and question #101
This commit is contained in:
bel
2015-04-19 00:43:11 +02:00
parent 259415c392
commit 436bc39555
5 changed files with 240 additions and 71 deletions

View File

@ -151,6 +151,7 @@ int main(int argc, char *argv[])
printf("Server init\n\n");
/* Then connect a first client */
/* TODO: parameters changed -> fix them */ xxx
newconn1 = mg_connect_websocket_client("localhost", atoi(PORT), 0, ebuf, sizeof(ebuf),
"/websocket", NULL, websocket_client_data_handler, websocket_client_close_handler,
&client1_data);