sta / sta/websocket-sharp

Broadcasting to all clients

Open
#284 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

Hi,

I am having difficult time broadcasting a single message to all clients. Is it mandatory to use Send or Sessions.Broadcast with in OnMessage method.

Can I do this separately, I want to broadcast a message irrespective that I receive any message from the client. When I try to call

Sessions.Broadcast ("message");

I get a Object reference not set to an instance of an object. message.

Help is appreciated.

Thanks.

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

The report only names Sessions.Broadcast and OnMessage, with no source files or tests. Start by tracing how Sessions is initialized and whether it is available outside OnMessage, then reproduce the null-reference error. Done would require a confirmed supported way to broadcast independently, along with the relevant test or documentation change.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.