e.Data (MessageEventArgs.Data) as a public static string?
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.1k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
Hello all,
Trying to copy data received from one websocket connection to another websocket session. I was thinking to use a public static variable for this purpose
public static MessageEventArgs.Data copy data;
public class Input : WebSocketBehavior
{
protected override void OnMessage(MessageEventArgs e)
{
data = e.data;
}
}
public class AllCommunication : WebSocketBehavior
{
protected override void OnMessage(MessageEventArgs e)
{
Sessions.Broadcast(data);
}
}
Basically I want to take everything from one input and rebroadcast it to many users connected on a different session.
Thanks for any ideas or suggestions!
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
Review how Input receives MessageEventArgs.Data and how AllCommunication uses Sessions.Broadcast. Determine whether the project provides a supported way to relay messages from one WebSocket connection to sessions on another; done would be a clearly defined, working rebroadcast approach.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100