Esempio n. 1
0
 SecureSocket(IOLoop loop, SocketInfo info, IntPtr tlsContext)
     : base(loop, info)
 {
     stream = new SecureSocketStream (this, new IntPtr (info.fd), tlsContext);
     this.tlsContext = tlsContext;
     this.state = Socket.SocketState.Open;
 }
Esempio n. 2
0
        public EventedSocket(IOLoop loop)
        {
            if (loop == null)
                throw new ArgumentNullException ("loop");

            this.Loop = loop;
        }
Esempio n. 3
0
 SecureSocket(IOLoop loop, SocketInfo info, IntPtr tlsContext)
     : base(loop, info)
 {
     stream          = new SecureSocketStream(this, new IntPtr(info.fd), tlsContext);
     this.tlsContext = tlsContext;
     this.state      = Socket.SocketState.Open;
 }
Esempio n. 4
0
        public SocketStream(SocketInfo info, IOLoop ioloop)
            : base(ioloop)
        {
            state = SocketState.Open;

            port    = info.port;
            address = info.Address;
        }
Esempio n. 5
0
        public SocketStream(SocketInfo info, IOLoop ioloop)
            : base(ioloop)
        {
            state = SocketState.Open;

            port = info.port;
            address = info.Address;
        }
Esempio n. 6
0
        PlainSocketStream(SocketInfo info, IOLoop ioloop) : base(info, ioloop)
        {
            fd = info.fd;

            if (fd > 0)
            {
                SetHandle(fd);
            }
        }
Esempio n. 7
0
        public EventedSocket(IOLoop loop)
        {
            if (loop == null)
            {
                throw new ArgumentNullException("loop");
            }

            this.Loop = loop;
        }
Esempio n. 8
0
        PlainSocketStream(SocketInfo info, IOLoop ioloop)
            : base(info, ioloop)
        {
            fd = info.fd;

            if (fd > 0) {
                SetHandle (fd);
            }
        }
Esempio n. 9
0
 public SecureSocket(IOLoop loop, string certFile, string keyFile)
     : base(loop)
 {
     int err = manos_tls_init (out tlsContext, certFile, keyFile);
     if (err != 0) {
         throw new InvalidOperationException (
             string.Format ("Error {0}: failed to initialize TLS socket with keypair ({1}, {2})",
                 err, certFile, keyFile));
     }
 }
Esempio n. 10
0
        public SecureSocketStream(string certFile, string keyFile, IOLoop ioloop) : base(ioloop)
        {
            int err = manos_tls_init(out tls, certFile, keyFile);

            if (err != 0)
            {
                throw new InvalidOperationException(
                          string.Format("Error {0}: failed to initialize TLS socket with keypair ({1}, {2})",
                                        err, certFile, keyFile));
            }
        }
Esempio n. 11
0
        protected EventedStream(IOLoop loop, IntPtr handle)
        {
            if (loop == null)
                throw new ArgumentNullException ("loop");
            if (handle == IntPtr.Zero)
                throw new ArgumentException ("handle");

            this.Loop = loop;
            this.Handle = handle;

            this.readWatcher = new IOWatcher (Handle, EventTypes.Read, Loop.EVLoop, HandleReadReady);
            this.writeWatcher = new IOWatcher (Handle, EventTypes.Write, Loop.EVLoop, HandleWriteReady);
        }
Esempio n. 12
0
        protected EventedStream(IOLoop loop, IntPtr handle)
        {
            if (loop == null)
            {
                throw new ArgumentNullException("loop");
            }
            if (handle == IntPtr.Zero)
            {
                throw new ArgumentException("handle");
            }

            this.Loop   = loop;
            this.Handle = handle;

            this.readWatcher  = new IOWatcher(Handle, EventTypes.Read, Loop.EVLoop, HandleReadReady);
            this.writeWatcher = new IOWatcher(Handle, EventTypes.Write, Loop.EVLoop, HandleWriteReady);
        }
Esempio n. 13
0
 public PlainSocket(IOLoop loop)
     : base(loop)
 {
 }
Esempio n. 14
0
 public PlainSocketStream(IOLoop ioloop) : base(ioloop)
 {
 }
Esempio n. 15
0
 protected EventedSocket(IOLoop loop, SocketInfo info)
     : this(loop)
 {
     address = info.Address.ToString();
     port    = info.port;
 }
Esempio n. 16
0
 protected EventedSocket(IOLoop loop, SocketInfo info)
     : this(loop)
 {
     address = info.Address.ToString ();
     port = info.port;
 }
Esempio n. 17
0
 PlainSocket(IOLoop loop, SocketInfo info)
     : base(loop, info)
 {
     stream = new PlainSocketStream (this, new IntPtr (info.fd));
     this.state = Socket.SocketState.Open;
 }
Esempio n. 18
0
 public PlainSocket(IOLoop loop)
     : base(loop)
 {
 }
Esempio n. 19
0
 public PlainSocketStream(IOLoop ioloop)
     : base(ioloop)
 {
 }
Esempio n. 20
0
 PlainSocket(IOLoop loop, SocketInfo info)
     : base(loop, info)
 {
     stream     = new PlainSocketStream(this, new IntPtr(info.fd));
     this.state = Socket.SocketState.Open;
 }