0

I want to implement all types error Handling for web socket implementation at server side.

My Server Side Code

public class WebSocketManager : WebSocketHandler
{

    public override void OnOpen()
    {
       // Do when Connection Is Open
    }

    public override void OnClose()
    {
      // Close Connection
    }

    public override void OnMessage(string message)
    {
       // When Any Message Sent to Client
    }      
}

1 Answers1

0

You can add exception handling using try catch blocks and log the errors to a log file. Like this:

http://www.codeproject.com/Articles/2344/Create-Simple-Error-Log-Files-using-ASP-NET-and-C

Or you can log them to the event viewer if you want.

Vivek Verma
  • 333
  • 3
  • 13