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

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

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

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

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

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

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