send can fail silently when sending would block (EWOULDBLOCK return for send) (#18)
* try to use a pipe for communication * flush send buffer on the background thread * cleanup * linux fix / linux still use event fd for now * cleanup
This commit is contained in:
committed by
GitHub
parent
dedbeb3eab
commit
08c2cdbf1d
@ -10,11 +10,11 @@
|
||||
|
||||
namespace ix
|
||||
{
|
||||
int ws_echo_server_main(int port)
|
||||
int ws_echo_server_main(int port, const std::string& hostname)
|
||||
{
|
||||
std::cout << "Listening on port " << port << std::endl;
|
||||
std::cout << "Listening on " << hostname << ":" << port << std::endl;
|
||||
|
||||
ix::WebSocketServer server(port);
|
||||
ix::WebSocketServer server(port, hostname);
|
||||
|
||||
server.setOnConnectionCallback(
|
||||
[](std::shared_ptr<ix::WebSocket> webSocket)
|
||||
|
Reference in New Issue
Block a user