libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] Protocol upgrade


From: Evgeny Grin
Subject: Re: [libmicrohttpd] Protocol upgrade
Date: Mon, 14 Nov 2016 19:51:09 +0300
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

Dear Markus,

You are talking only about WebSockets protocol, but HTTP "Upgrade" can
be used for many other things.
MHD leave implementation of "upgraded" protocol to application.

As mentioned in RFC6455:
================================================
The WebSocket Protocol is an independent TCP-based protocol.  Its
only relationship to HTTP is that its handshake is interpreted by
HTTP servers as an Upgrade request.
================================================

Currently MHD didn't implement any part of WebSockets protocol except
HTTP "Upgrade" support.

Implementations are welcome. :)

-- 
Best Wishes,
Evgeny Grin

On 14.11.2016 16:16, Markus Doppelbauer wrote:
> Dear Evgeny,
> 
>> The best what MHD could do with "upgraded" sockets - is
>> to forward data to application and back to remote.
> 
> Yes - as much as data until the socket blocks. And it
> should hide everything else from the application, e.g.
> "sha1('Sec-WebSocket-Accept')".
> 
> Is is easy to figure out, whether the the data contains
> half of a request or multiple requests.
> 
> I don't know about others, but we need only the server-side
> counterpart to the javascript "new WebSocket(url)".
> 
> Thanks a lot!
> Markus
> 
> 
> 
> Am Montag, den 14.11.2016, 15:35 +0300 schrieb Evgeny Grin:
>> Dear Markus,
>>
>> It's clear how to use this logic for HTTP connections.
>> But application may use any arbitrary protocol for "upgraded" sockets so
>> MHD doesn't know what should be interpreted as "request"(if word
>> "request" is applicable for protocol). The best what MHD could do with
>> "upgraded" sockets - is to forward data to application and back to remote.
>> That's implemented currently. For TLS connections, MHD hides all
>> TLS-related machinery and provides plain socket for application.
>>
>> Not sure that I get idea about "pipe() on TLS". Could you explain it a
>> little?
>>

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]