[Interest] QWebSocket/Server
Reinhardt Behm
rbehm at hushmail.com
Tue Sep 19 09:20:51 CEST 2017
On Tuesday 19 September 2017 08:44:13 Rainer Wiesenfarth
<rainer_wiesenfarth at trimble.com> wrote:
> On Tue, Sep 19, 2017 at 4:27 AM, Reinhardt Behm <rbehm at hushmail.com> wrote:
> > I am using QWebSocket and QWebSocketServer (Qt5.5)
> > Is it possible to have another Server (as HTTP server) listening at the
> > same
> > port?
>
> No, each port can be listened to only by one server. This is by design of
> the underlying protocol (TCP, but also UDP).
That was also my understanding. I hoped there is some trick as the WebSocket
protocol sits on top of HTTP.
> > QWebSocket supports binaryFrameReceived(). Is there any support to send
> > Frames?
>
> sendBinaryMessage()?
That is just a complete message, signaled by binaryMessageReceived(). The
WebSocket protocol can split messages into frames. But it seems there is
currently no support to send frames, only the reception is supported. My idea
was to split large messages and also have the receiver being able to report
progress and not have a large message fully in memory.
>
> QWebSocket has a signal bytesWritten(). Any support for receive progress?
>
>
> No, this is also not supported by the underlying protocol. You will
> receive an error() signal if something went wrong.
>
> If you need acknowledge messages, you have to add these to your own
> protocol.
Ok, I can make my own protocol on top of WebSocket, send chunks and replies
from the receiver.
>
> Cheers, Rainer
--
Best Regards
Reinhardt Behm
More information about the Interest
mailing list