curl-library
Re: better handling of websocket protocol upgrades
Date: Mon, 27 Jul 2015 17:05:57 +0200
On 27/07/15 15:49, Gisle Vanem wrote:
> Sorry I haven't followed this thread. So I don't know really
> what you're trying to accomplish. Is your intention to handle
> all the nitty-gritty details of WebSocket (RFC6455) yourself?
> So in the end make this possible?
> curl ws://echo.websocket.org/
> curl wss://echo.websocket.org/ (secure WS)
The idea was, to enable libcurl to conduct the websocket protocol
upgrade (the HTTP part) and then yield the control to whatever comes
next. So the established connection is nothing more than a bidirectional
byte-transport layer (TCP/SSL). Nothing more.
To generate/send and receive/interpret the Websocket-Frames, one has to
use a library (libwebsocket?) or programm the framing by himself.
My thoughts did not extend to the 'curl' command line tool, but maybe it
would be possible to feed it the bytestream by stdin/stdout.
> I had a test of:
> https://libwebsockets.org/trac/libwebsocket
Thanks allot for the hint. Since I do my http stuff with libcurl it was
natural to try to adopt the websocket handling on top of libcurl. But
maybe this is not the right approach at all. One problem with a library
like libwebsocket could be that it might does not offer to set the HTTP
parameters of the upgrade request on a low enough level for my purposes.
But I will for sure have a look at the library.
cheers, Frank
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-07-27