When will membrane offically support websocket?

34 views
Skip to first unread message

steve...@gmail.com

unread,
May 26, 2015, 8:47:01 AM5/26/15
to membrane...@googlegroups.com
I saw some websocket support code in the master branch on GitHub, 
and I tested, it works, but I am not sure if it just at early stage.
 
Is there a plan or road map to include websocket support in a stable release? next release? 
I am looking forward to use membrane proxy with websocket support.
 
Thanks.
 

Tobias Polley

unread,
May 26, 2015, 9:01:07 AM5/26/15
to membrane...@googlegroups.com, steve...@gmail.com, steve...@gmail.com
Hi Steven,

the latest code on Github works and will be contained in the next official 4.1 release. I cannot commit to any schedule at the moment, though.

When allowWebSockets is set to "true" and Membrane detects a switch to the WebSocket protocol, it will basically go out of the way and simply forward any packets (or WebSocket frames, if you like) from the client to the server (and vice versa). At the moment, Membrane does not parse or enforce correct usage of the WebSocket protocol. Nor does it offer any monitoring and/or logging. This might change in the future, but not before the next official release.

We use

<router>
    <httpClientConfig allowWebSockets="true" />
   
    <serviceProxy port="443" >
        <ssl>
                ... <!-- keystore configuration -->
        </ssl>
        <if test="exc.request.header.getFirstValue('Upgrade') == 'websocket'">
            <groovy>
                exc.request.uri = "/"
                exc.destinations[0] = "http://localhost:61614/"
            </groovy>
            <httpClient />
        </if>
        <target host="localhost" port="8080" />
    </serviceProxy>
</router>

to forward any WebSocket connection locally to port 61614, while normal HTTP requests (=non-WebSocket requests) will be forwarded to 8080.

I do not expect the configuration to change. (Any suggestions? ;) )

Best, Tobias
Reply all
Reply to author
Forward
0 new messages