ChatClient/ChatClient.cs
/// <summary>
/// Connects the client socket and starts raising events.
/// </summary>
Connects the client socket and starts raising events.
Connects the client socket and starts raising events .
public void Connect() {
            if (socket == null)
                socket = new WebSocket(_socketUrl);
            if (socket.IsAlive) {
                LogLine("Socket is already connected", LogLevel.Warn);
                return;
            }
            socket.OnOpen += Socket_OnOpen;
            socket.OnClose += Socket_OnClose;
            socket.OnError += Socket_OnError;
            socket.OnMessage += Socket_OnMessage;
            socket.Connect();
        }
public void Connect ( ) { if ( socket == null ) socket = new WebSocket ( _socketUrl ) ; if ( socket . IsAlive ) { LogLine ( " " , LogLevel . Warn ) ; return ; } socket . OnOpen += Socket_OnOpen ; socket . OnClose += Socket_OnClose ; socket . OnError += Socket_OnError ; socket . OnMessage += Socket_OnMessage ; socket . Connect ( ) ; }
Connects the client socket and starts raising events.
Connects the client socket and starts raising events .