sta / sta/websocket-sharp

AddWebSocketService() obsolete overload has no appropriate replacement

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

	System.Func<ClientConnection> AllocService = () =>
	{
		return new ClientConnection(this);
	};
	Socket.AddWebSocketService<ClientConnection>("/", AllocService);

This overload is marked obsolete, but I can't see how to replicate the above; construct the behaviour with some parameters. I can only see parameterless-constructor options...
Maybe I've misread the non-obsolete overloads...

FYI, the readme example uses this paradigm.

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 by comparing the obsolete AddWebSocketService("/", AllocService) call with the non-obsolete overloads and the README example referenced in the issue. Confirm whether an existing overload preserves the allocator behavior; done means the equivalent usage is identifiable and the README no longer relies on an obsolete pattern.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.