mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
e8313084f9
This adds few functions to use evhttp-based webserver to handle incoming WebSockets connections. We've tried to use both libevent and libwebsockets in our application, but found that we need to have different ports at the same time to handle standard HTTP and WebSockets traffic. This change can help to stick only with libevent library. Implementation was inspired by modified Libevent source code in ipush project [1]. [1]: https://github.com/sqfasd/ipush/tree/master/deps/libevent-2.0.21-stable Also, WebSocket-based chat server was added as a sample.
8 lines
159 B
C
8 lines
159 B
C
#ifndef REGRESS_WS_H
|
|
#define REGRESS_WS_H
|
|
|
|
void http_on_ws_cb(struct evhttp_request *req, void *arg);
|
|
void http_ws_test(void *arg);
|
|
|
|
#endif /* REGRESS_WS_H */
|