Example #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;
 }
Example #2
0
        public EventedSocket(IOLoop loop)
        {
            if (loop == null)
                throw new ArgumentNullException ("loop");

            this.Loop = loop;
        }
Example #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;
 }
Example #4
0
        public SocketStream(SocketInfo info, IOLoop ioloop)
            : base(ioloop)
        {
            state = SocketState.Open;

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

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

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

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

            if (fd > 0) {
                SetHandle (fd);
            }
        }
Example #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));
     }
 }
Example #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));
            }
        }
Example #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);
        }
Example #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);
        }
Example #13
0
 public PlainSocket(IOLoop loop)
     : base(loop)
 {
 }
Example #14
0
 public PlainSocketStream(IOLoop ioloop) : base(ioloop)
 {
 }
Example #15
0
 protected EventedSocket(IOLoop loop, SocketInfo info)
     : this(loop)
 {
     address = info.Address.ToString();
     port    = info.port;
 }
Example #16
0
 protected EventedSocket(IOLoop loop, SocketInfo info)
     : this(loop)
 {
     address = info.Address.ToString ();
     port = info.port;
 }
Example #17
0
 PlainSocket(IOLoop loop, SocketInfo info)
     : base(loop, info)
 {
     stream = new PlainSocketStream (this, new IntPtr (info.fd));
     this.state = Socket.SocketState.Open;
 }
Example #18
0
 public PlainSocket(IOLoop loop)
     : base(loop)
 {
 }
Example #19
0
 public PlainSocketStream(IOLoop ioloop)
     : base(ioloop)
 {
 }
Example #20
0
 PlainSocket(IOLoop loop, SocketInfo info)
     : base(loop, info)
 {
     stream     = new PlainSocketStream(this, new IntPtr(info.fd));
     this.state = Socket.SocketState.Open;
 }