websocket-sharp icon indicating copy to clipboard operation
websocket-sharp copied to clipboard

Dynamic class names? wssv.AddWebSocketService<DYNAMIC>("/dynamic");

Open winkmichael opened this issue 6 years ago • 2 comments

Alright, so I know the answer in C# is no, don't do this, dynamic class names are not really a thing :) So let me ask another way, I would love to be able to pass the url in via command line arguments. Has anyone found a way where I can dynamically create url names? I would be ok with even doing /live/streamname/ style but can't seem to find a good path to do it.

Any suggestions? Thanks!

winkmichael avatar Sep 04 '19 04:09 winkmichael

I wonder also is there any way to create a dynamic 'WebSocketBehavior' as @winkmichael suggested?

ariburaco avatar May 18 '22 12:05 ariburaco

I've found a way to implement my dynamic socket service in this way. Maybe it will help someone. wssv.AddWebSocketService($"/ServiceName", () => { return new Stream("ServiceName"); });

ariburaco avatar May 18 '22 15:05 ariburaco