sta / sta/websocket-sharp

is websocket-sharp very slow?

Open
#739 3 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

hi (sory my english)
i made some test: i connect to chrome dev tools listening on port 9222 by two dll's - websocketsharp and websocket4net - both ask chrome the same questions and get the same answers but websocket4net use 1,6 second for complete all tests and websocketsharp 25s !!!
any idea what may be a problem ?

public string SendCmd(string cmd)
{
	string message = "";
	using (var ws = new WebSocketSharp.WebSocket(this.sessionWSEndpoint))
	{
		ws.OnMessage += (sender, e) =>
		{
			message = e.Data;
		};
		ws.OnError += (sender, e) =>
		{
			message = e.Message;
		};
		ws.OnOpen += (sender, e) =>
		
			ws.Send(cmd);

		ws.OnClose += (sender, e) =>
		{
			//message = string.Format("code {0},reason {1}", e.Code, e.Reason);
		};
		ws.Connect();
		while (message == "")
		{
			System.Threading.Thread.Sleep(10);
		}
	}
	return message;
}

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 with the SendCmd method in the issue and reproduce the comparison against Chrome DevTools on port 9222. Trace the connection, send, receive, and close timing; the issue provides no repository file or test, and done would require identifying the cause of the websocket-sharp delay and a focused way to verify it.

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
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.