Some improvements to Servatice network code (#3969)

* Some improvements to Servatice network code

1. fix crash on fuzzy connection (tcp server only)
2. ensure websockets are parent()ed to avoid leaking them
3. quick catch disconnect()ed sockets instead of waiting for a socket error to happen
4. supporto mulltiple connection pools on the websocket server; they are still bound to the same thread due to a qt5 limitation.
This commit is contained in:
ctrlaltca 2020-04-24 22:26:59 +02:00 committed by GitHub
parent 46fe0cd725
commit d30691559a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 34 additions and 12 deletions

View file

@ -29,12 +29,12 @@ port=4747
; Set to 0 to disable the tcp server.
number_pools=1
; Servatrice can listen for clients on websockets, too. Unfortunately it can't support more than one thread.
; Servatrice can listen for clients on websockets, too. Multiple connection pools are available but
; unfortunately, due to a Qt limitation, they must run in the same execution thread.
; Set to 0 to disable the websocket server.
websocket_number_pools=1
; The IP address servatrice will listen on for websockets clients; defaults to "any"
websocket_host=any
; The TCP port number servatrice will listen on for websockets clients; default is 4748