Bauglir.Ex.WebSocketClientConnection.Start C# (CSharp) Method

Start() public method

public Start ( string aHost, string aPort, string aResourceName, bool aSsl ) : bool
aHost string
aPort string
aResourceName string
aSsl bool
return bool
        public bool Start(string aHost, string aPort, string aResourceName, bool aSsl)
        {
            return Start(aHost, aPort, aResourceName, aSsl, "-", "-", "-", "-", 13);
        }

Same methods

WebSocketClientConnection::Start ( string aHost, string aPort, string aResourceName ) : bool
WebSocketClientConnection::Start ( string aHost, string aPort, string aResourceName, bool aSsl, string aOrigin ) : bool
WebSocketClientConnection::Start ( string aHost, string aPort, string aResourceName, bool aSsl, string aOrigin, string aProtocol ) : bool
WebSocketClientConnection::Start ( string aHost, string aPort, string aResourceName, bool aSsl, string aOrigin, string aProtocol, string aExtension ) : bool
WebSocketClientConnection::Start ( string aHost, string aPort, string aResourceName, bool aSsl, string aOrigin, string aProtocol, string aExtension, string aCookie ) : bool
WebSocketClientConnection::Start ( string aHost, string aPort, string aResourceName, bool aSsl, string aOrigin, string aProtocol, string aExtension, string aCookie, int aVersion ) : bool

Usage Example

示例#1
0
 public void Connect()
 {
     _messageHandler = new CoupledWebSocketMessageHandler(this);
     _connection = new WebSocketClientSSLConnection(_cert, _messageHandler);
     _connection.ConnectionClose += _messageHandler.OnClose;
     _connection.ConnectionClose += delegate { OnDisconnected(); };
     _connection.ConnectionOpen += _messageHandler.OnOpen;
     _connection.ConnectionOpen += delegate { OnConnected(); };
     _connection.ConnectionReadFull += ProcessStream;
     try
     {
         if (!_connection.Start(_uri.Host, _uri.Port.ToString(), _uri.PathAndQuery, true, "", "message"))
         {
             throw new IOException("Unknown error connecting to " + _uri);
         }
         _connection.SendText(_uniqueId);
     }
     catch (Exception e)
     {
         Logger.Error("Failed to connect to server [" + _uri + "] : " + e.Message);
         throw new IOException("Failed to connect to server [" + _uri + "] : " + e.Message, e);
     }
 }
All Usage Examples Of Bauglir.Ex.WebSocketClientConnection::Start