private void SendHeader() { handshake = new ClientHandshake { Version = "8", Origin = Origin, Host = host, Key = GenerateKey(), ResourcePath = path, SubProtocols = SubProtocols }; client.Client.Send(Encoding.UTF8.GetBytes(handshake.ToString())); }
private void Authenticate() { _handshake = new ClientHandshake { Version = "8", Origin = Origin, Host = _host, Key = GenerateKey(), ResourcePath = _path, SubProtocols = SubProtocols}; _client.Client.Send(Encoding.UTF8.GetBytes(_handshake.ToString())); }
private void Authenticate() { _handshake = new ClientHandshake { Version = "8", Origin = Origin, Host = _host, Key = GenerateKey(), ResourcePath = _path, SubProtocols = SubProtocols}; // mjb //_client.Client.Send(Encoding.UTF8.GetBytes(_handshake.ToString())); if (_context.SslStream != null) { SslStream ns = _context.SslStream; byte[] buffer = Encoding.UTF8.GetBytes(_handshake.ToString()); ns.Write(buffer, 0, buffer.Length); } else { _client.Client.Send(Encoding.UTF8.GetBytes(_handshake.ToString())); } }