per message deflate support (with zlib)
This commit is contained in:
		
							
								
								
									
										3
									
								
								examples/chat/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								examples/chat/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| build | ||||
| venv | ||||
| node_modules | ||||
| @@ -77,7 +77,7 @@ namespace | ||||
|     void WebSocketChat::start() | ||||
|     { | ||||
|         std::string url("ws://localhost:8080/"); | ||||
|         _webSocket.configure(url); | ||||
|         _webSocket.setUrl(url); | ||||
|  | ||||
|         std::stringstream ss; | ||||
|         log(std::string("Connecting to url: ") + url); | ||||
| @@ -85,8 +85,10 @@ namespace | ||||
|         _webSocket.setOnMessageCallback( | ||||
|             [this](ix::WebSocketMessageType messageType, | ||||
|                const std::string& str, | ||||
|                size_t wireSize, | ||||
|                const ix::WebSocketErrorInfo& error, | ||||
|                const ix::CloseInfo& closeInfo) | ||||
|                const ix::WebSocketCloseInfo& closeInfo, | ||||
|                const ix::WebSocketHttpHeaders& headers) | ||||
|             { | ||||
|                 std::stringstream ss; | ||||
|                 if (messageType == ix::WebSocket_MessageType_Open) | ||||
|   | ||||
							
								
								
									
										31
									
								
								examples/chat/package-lock.json
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								examples/chat/package-lock.json
									
									
									
										generated
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,31 @@ | ||||
| { | ||||
|   "requires": true, | ||||
|   "lockfileVersion": 1, | ||||
|   "dependencies": { | ||||
|     "async-limiter": { | ||||
|       "version": "1.0.0", | ||||
|       "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", | ||||
|       "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==" | ||||
|     }, | ||||
|     "safe-buffer": { | ||||
|       "version": "5.1.2", | ||||
|       "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", | ||||
|       "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" | ||||
|     }, | ||||
|     "ultron": { | ||||
|       "version": "1.1.1", | ||||
|       "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", | ||||
|       "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" | ||||
|     }, | ||||
|     "ws": { | ||||
|       "version": "3.3.3", | ||||
|       "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", | ||||
|       "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", | ||||
|       "requires": { | ||||
|         "async-limiter": "1.0.0", | ||||
|         "safe-buffer": "5.1.2", | ||||
|         "ultron": "1.1.1" | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user