Beispiel #1
0
        protected internal virtual RpcTcpConnection CreateConnection()
        {
            RpcTcpConnection connection = null;

            if (configuration.IsCipherSet)
            {
                RpcTcpConnectionEncrypted encryptedConnection =
                    new RpcTcpConnectionEncrypted(innerTcpClient, this, configuration);
                encryptedConnection.SetCipher(configuration.CreateNewCipher());
                connection = encryptedConnection;
            }
            else
            {
                connection = new RpcTcpConnection(innerTcpClient, this, configuration);
            }
            return(connection);
        }
Beispiel #2
0
        internal virtual RpcTcpConnection CreateConnection()
        {
            RpcTcpConnection connection = null;

            if (configuration.IsCipherSet)
            {
                RpcTcpConnectionEncrypted encryptedConnection =
                    CreateConnectionInternal <RpcTcpConnectionEncrypted>(() =>
                                                                         new RpcTcpConnectionEncrypted(innerTcpServer, this, configuration));
                encryptedConnection.SetCipher(configuration.CreateNewCipher());
                connection = encryptedConnection;
            }
            else
            {
                connection =
                    CreateConnectionInternal <RpcTcpConnection>(() =>
                                                                new RpcTcpConnection(innerTcpServer, this, configuration));
            }

            return(connection);
        }