WebSocketListener icon indicating copy to clipboard operation
WebSocketListener copied to clipboard

on open client socket procedure

Open ghost opened this issue 8 years ago • 4 comments

on open client socket( from javascript) connection procedure

what is the procedure name in socket server project, so I would like to add a log on each client connected to Socket Server ?

ghost avatar Jul 18 '16 09:07 ghost

I don't know if I understood your question. If you want to log when a client connects to the server, probably doing it after AcceptWebSocketAsync returns a new connected client is the right place.

vtortola avatar Jul 18 '16 23:07 vtortola

AcceptWebSocketAsync yes, it fires once on client connect if I want to take some properties on this connection like: remote address the connect comes from or some user info, and more, is there any doc about ?

ellLazar avatar Jul 19 '16 08:07 ellLazar

You can find that information in the properties:

  • WebSocket.LocalEndpoint
  • WebSocket.RemoteEndpoint
  • WebSocket.HttpRequest

Cheers.

vtortola avatar Jul 19 '16 16:07 vtortola

how to get socket ID ? so I can define it in some List with a uniqe value something like : WebSocket.SocketID

ellLazar avatar Aug 03 '16 07:08 ellLazar