[Libwebsockets] Trying to get protocol callback mount to work

Alex Stagg alex at bitrouter.com
Wed Oct 10 18:01:53 CEST 2018

I have client and server test programs using libwebsockets to simulate a
client-initiated websockets connection without a (websockets sub-)protocol
name, and get the server to assign it to one of several protocol callbacks
based on the URL.


When I specify a protocol string in the client connection info that matches
the name of protocol 1 on both sides, the connection is assigned to protocol
1 on both sides, as I would expect. If I specify NULL as the protocol string
pointer in the client connection info, then I get the connection assigned to
protocol 0 on both sides as normally expected without using URL mounts.


Am I incorrect in understanding that properly configuring URL mounts can get
the connection with no protocol from the client side assigned to protocol 1
(at least on the server side)? If so, I have not been able to get this to
work regardless of how I try to match values in the server's struct
lws_http_mount with the client's connection info, and the protocol arrays.
What info would someone need to help me debug this?


*	Alex Stagg


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20181010/2de19156/attachment.html>

More information about the Libwebsockets mailing list