Beispiel #1
0
 public virtual void MakeConnection(Transport transport)
 {
     this.Transport = transport;
     this.Transport.Protocol = this;
     this.ConnectionMade();
     this.Transport.Read();
 }
Beispiel #2
0
        public SSLConnector(TcpClient client, Factory factory)
        {
            Client = client;
            Factory = factory;

            Stream = new SslStream(client.GetStream(), false, new RemoteCertificateValidationCallback(ValidateCert));
            Transport = new Transport(Stream);
            ((SslStream)Stream).AuthenticateAsClient("twisted-sharp", null, SslProtocols.Ssl3, false);

            factory.Protocol.MakeConnection(Transport);
        }