c# - Pass client id/information from a .NET client to a web socket service -


is there way pass client information (such id, username or other contextual information) client part of making websocket connection .net client(console,silverlight etc)? how i'm making connection socket service.

using (websocket socket = new websocket(@"ws://"+environment.machinename+":4502/commandserver")) {             socket.onclose += socket_onclose;             socket.ondata += socket_ondata;             socket.onopen += socket_onopen;             socket.open(); } 

the ctor has overload accepts "origin" , "protocol", not sure if can used passing client information. if not there api call can make pass in client information part of making connection?

edit: i'm using microsoft library , sample service code adds service object collection in it's ctor keep track of client sessions. hence need way pass in client data service object part of initial client connection can use identify clients , send messages specific clients (based on id example) service.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -