[Interest] QWebSocket/Server

Thiago Macieira thiago.macieira at intel.com
Tue Sep 19 08:51:15 CEST 2017


On Monday, 18 September 2017 23:44:13 PDT Rainer Wiesenfarth wrote:
> ​No, each port can be listened to only by one server. This is by design of
> the underlying protocol (TCP, but also UDP).

Unless you can find a way to multiplex different protocols at an intermediary 
layer. The TLS header has an extension called Next Protocol Negotiation (NPN), 
so it's possible for the client to declare intent and the server react by 
serving different protocols. This is will be used for HTTP/2, but it's 
possible to use for other protocols too.

Note how this requires client support.

This doesn't mean the QWebServer class is able to react to the NPN. But it's 
possible to do so in theory.

An alternative is to detect the protocol by fingerprinting what it actually 
sends on the wire. For example, if it sent HELO instead of GET, you could 
conclude it's an SMTP client instead of HTTP. This does not require client 
support, but does require that the two protocols be different enough that it's 
not possible to mistake one for the other.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Interest mailing list