0 votes
by (120 points)
edited by

Hi

I am testing the Websocket library from Rebex Labs for use in Windows Embedded Compact 2013, which uses the .Net CF 3.9 framework.

Mostly it works quite well (and better out-of-the-box than any other library I've tried), but it appears that when I have a Query parameter in the URL, then this value is either not sent or somehow corrupted. In any case, the server doesn't appear to see it.

Example:
WebSocketClient client = new WebSocketClient();
client.Connect(@"ws://websocket.website.com/subDomain/page.ashx?channel=123");

In this particular case, if I don't identify a channel in the URL, then the server sends a single line ("not identified") and immediately disconnects.

This leaves the client in State=Open, but any send or receive operation causes a socketexception. Sometimes I can read the single line, usually I can't.

Am I interpreting the situation correctly that the "?channel=123" part of the URL is being dropped/ignored/corrupted? Is there any way around this?

edit: GET -> Query

1 Answer

0 votes
by (72.7k points)
edited by

Hello,

I am not able to reproduce the issue, because I got "The server returned status code '301' when status code '101' was expected." error for the mentioned URL.

However, I have checked the source code and you are right, the Query part of the Uri is not sent to the server.

I have changed Uri.AbsolutePath to Uri.PathAndQuery. Please give it a try. New beta is available at labs.rebex.net/websockets

Update: The WebSocket library is now a fully-supported component available at https://www.rebex.net/websocket/

...