send("message") inside onopen() always fail
Open
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.1k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
Using javascript to invoke a WSSharp server
var ws = new WebSocket("ws://localhost:5002/test");
ws.onopen = function () {
setTimeout(function () {
ws.send("Hello");
}, 1000);
};
The above code will fail if I do not wrap ws.send() with setTimeout()
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with the JavaScript WebSocket example against the WSSharp server at ws://localhost:5002/test, comparing an immediate send in onopen() with the delayed send. No source file or test is named, so first locate the server's connection-open and message-handling entry points; done means immediate sends succeed without setTimeout().
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, javascript
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100