Esempio n. 1
0
        public TcpSocketRioServerConfiguration()
        {
            BufferManager     = new SegmentBufferManager(1024, 8192, 1, true);
            ReceiveBufferSize = 8192;

            FrameBuilder = new LengthPrefixedFrameBuilder();
        }
        public TcpSocketSaeaClientConfiguration()
        {
            BufferManager     = new SegmentBufferManager(100, 8192, 1, true);
            ReceiveBufferSize = 8192;
            SendBufferSize    = 8192;
            ReceiveTimeout    = TimeSpan.Zero;
            SendTimeout       = TimeSpan.Zero;
            NoDelay           = true;
            LingerState       = new LingerOption(false, 0); // The socket will linger for x seconds after Socket.Close is called.

            FrameBuilder = new LengthPrefixedFrameBuilder();
        }
Esempio n. 3
0
        private WebSocketDispatcher BuildWebSocketDispatcher(IHybridModuleContainer container)
        {
            var moduleCatalog = new WebSocketModuleCatalog(
                () => { return(container.GetAllWebSocketModules()); },
                (Type moduleType) => { return(container.GetWebSocketModule(moduleType)); }
                );

            var routeResolver = new WebSocketRouteResolver(moduleCatalog);
            var bufferManager = new SegmentBufferManager(1024, 8192, 1, true);

            return(new WebSocketDispatcher(routeResolver, bufferManager));
        }
        public TcpSocketSaeaServerConfiguration()
        {
            BufferManager     = new SegmentBufferManager(1024, 8192, 1, true);
            ReceiveBufferSize = 8192;
            SendBufferSize    = 8192;
            ReceiveTimeout    = TimeSpan.Zero;
            SendTimeout       = TimeSpan.Zero;
            NoDelay           = true;
            LingerState       = new LingerOption(false, 0); // The socket will linger for x seconds after Socket.Close is called.

            PendingConnectionBacklog = 200;
            AllowNatTraversal        = true;

            FrameBuilder = new LengthPrefixedFrameBuilder();
        }
Esempio n. 5
0
        public AsyncTcpSocketClientConfiguration()
        {
            BufferManager     = new SegmentBufferManager(100, 8192, 1, true);
            ReceiveBufferSize = 8192;
            SendBufferSize    = 8192;
            ReceiveTimeout    = TimeSpan.Zero;
            SendTimeout       = TimeSpan.Zero;
            NoDelay           = true;
            LingerState       = new LingerOption(false, 0); // The socket will linger for x seconds after Socket.Close is called.

            SslEnabled                    = false;
            SslTargetHost                 = null;
            SslClientCertificates         = new X509CertificateCollection();
            SslEncryptionPolicy           = EncryptionPolicy.RequireEncryption;
            SslEnabledProtocols           = SslProtocols.Ssl3 | SslProtocols.Tls;
            SslCheckCertificateRevocation = false;
            SslPolicyErrorsBypassed       = false;

            ConnectTimeout = TimeSpan.FromSeconds(15);
            FrameBuilder   = new LengthPrefixedFrameBuilder();
        }
        public TcpSocketServerConfiguration()
        {
            BufferManager     = new SegmentBufferManager(1024, 8192, 1, true);
            ReceiveBufferSize = 8192;
            SendBufferSize    = 8192;
            ReceiveTimeout    = TimeSpan.Zero;
            SendTimeout       = TimeSpan.Zero;
            NoDelay           = true;
            LingerState       = new LingerOption(false, 0); // The socket will linger for x seconds after Socket.Close is called.

            PendingConnectionBacklog = 200;
            AllowNatTraversal        = true;

            SslEnabled                    = false;
            SslServerCertificate          = null;
            SslEncryptionPolicy           = EncryptionPolicy.RequireEncryption;
            SslEnabledProtocols           = SslProtocols.Ssl3 | SslProtocols.Tls;
            SslClientCertificateRequired  = true;
            SslCheckCertificateRevocation = false;
            SslPolicyErrorsBypassed       = false;

            ConnectTimeout = TimeSpan.FromSeconds(15);
            FrameBuilder   = new LengthPrefixedFrameBuilder();
        }
Esempio n. 7
0
        public PerMessageCompressionExtension()
        {
            var bufferAllocator = new SegmentBufferManager(100, 8192, 1, true);

            _deflater = new DeflateCompression(bufferAllocator);
        }