Deployed 0b8b560 with MkDocs version: 1.3.1
				
					
				
			This commit is contained in:
		| @@ -360,7 +360,9 @@ setHandshakeTimeout(handshakeTimeoutSecs); | ||||
|  | ||||
| // Run a server on localhost at a given port. | ||||
| // Bound host name, max connections and listen backlog can also be passed in as parameters. | ||||
| ix::WebSocketServer server(port); | ||||
| int port = 8008; | ||||
| std::string host("127.0.0.1"); // If you need this server to be accessible on a different machine, use "0.0.0.0" | ||||
| ix::WebSocketServer server(port, host); | ||||
|  | ||||
| server.setOnConnectionCallback( | ||||
|     [&server](std::weak_ptr<WebSocket> webSocket, | ||||
| @@ -438,7 +440,9 @@ server.wait(); | ||||
|  | ||||
| // Run a server on localhost at a given port. | ||||
| // Bound host name, max connections and listen backlog can also be passed in as parameters. | ||||
| ix::WebSocketServer server(port); | ||||
| int port = 8008; | ||||
| std::string host("127.0.0.1"); // If you need this server to be accessible on a different machine, use "0.0.0.0" | ||||
| ix::WebSocketServer server(port, host); | ||||
|  | ||||
| server.setOnClientMessageCallback([](std::shared_ptr<ix::ConnectionState> connectionState, ix::WebSocket & webSocket, const ix::WebSocketMessagePtr & msg) { | ||||
|     // The ConnectionState object contains information about the connection, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	