sta / sta/websocket-sharp

exception trying to connect to socket.io server

Open
#81 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
6.1k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

trying to connect to the url "ws://my.server.ip:3000/" fails.

If I enable logging, I get the following

08/10/2014 14:51:33|Warn |Logger.set_File|The current path to the log file has been changed to c:\temp\log.txt.
08/10/2014 14:51:33|Debug|WebSocket.send|A WebSocket connection request to ws://my.server.ip:3000/:
                      GET / HTTP/1.1
                      User-Agent: websocket-sharp/1.0
                      Upgrade: websocket
                      Connection: Upgrade
                      Host: my.server.ip
                      Sec-WebSocket-Key: xVS7ewLwqpJqe+12F6BouQ==
                      Sec-WebSocket-Version: 13
08/10/2014 14:51:33|Fatal|WebSocket.acceptException|WebSocketSharp.WebSocketException: An exception has occurred while receiving a handshake. ---> System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
                      Parameter name: value
                         at WebSocketSharp.Ext.EqualsWith(Int32 value, Char c, Action`1 action)
                         at WebSocketSharp.WebSocketStream.readHandshakeHeaders(Stream stream)
                         at WebSocketSharp.WebSocketStream.ReadHandshake[T](Func`2 parser, Int32 millisecondsTimeout)
                         --- End of inner exception stack trace ---
                         at WebSocketSharp.WebSocketStream.ReadHandshake[T](Func`2 parser, Int32 millisecondsTimeout)
                         at WebSocketSharp.WebSocketStream.ReadHandshakeResponse()
                         at WebSocketSharp.WebSocket.receiveHandshakeResponse()
                         at WebSocketSharp.WebSocket.sendHandshakeRequest(HandshakeRequest request)
                         at WebSocketSharp.WebSocket.sendHandshakeRequest()
                         at WebSocketSharp.WebSocket.doHandshake()
                         at WebSocketSharp.WebSocket.connect()
08/10/2014 14:51:33|Debug|WebSocket.closeHandshake|Was clean?: False
                      sent: False received: True

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at WebSocket.connect and follow the handshake path through WebSocket.sendHandshakeRequest, WebSocket.receiveHandshakeResponse, and WebSocketStream.readHandshakeHeaders. Reproduce the connection against the reported socket.io server and inspect the logged handshake response. Done should include a confirmed cause for the parsing exception and a verified resolution or clearly documented incompatibility.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.