public TokenChecker(GatewayInitiator initiator, TcpGateway gateway, Socket socket)
 {
     _initiator = initiator;
     _gateway = gateway;
     _logger = initiator.CreateChannelLogger(socket.RemoteEndPoint, socket);
     _socket = socket;
     _connection = new TcpConnection(_logger, socket) { Settings = initiator.ConnectionSettings };
 }
 public TcpChannel(GatewayInitiator initiator, Socket socket, object tag)
 {
     // open by client connection.
     _initiator = initiator;
     _logger = _initiator.CreateChannelLogger(socket.RemoteEndPoint, socket);
     _socket = socket;
     _connection = new TcpConnection(_logger, _socket) { Settings = initiator.ConnectionSettings };
     _tag = tag;
 }
 public TokenChecker(GatewayInitiator initiator, TcpGateway gateway, Socket socket)
 {
     _initiator  = initiator;
     _gateway    = gateway;
     _logger     = initiator.CreateChannelLogger(socket.RemoteEndPoint, socket);
     _socket     = socket;
     _connection = new TcpConnection(_logger, socket)
     {
         Settings = initiator.ConnectionSettings
     };
 }
        public TcpChannel(GatewayInitiator initiator, TcpConnection connection, object tag, Tuple<IActorRef, TaggedType[], ActorBindingFlags> bindingActor)
        {
            // open by registerd token.
            _initiator = initiator;
            _logger = initiator.CreateChannelLogger(connection.RemoteEndPoint, connection.Socket);
            _socket = connection.Socket;
            _connection = connection;
            _tag = tag;

            BindActor(bindingActor.Item1, bindingActor.Item2.Select(t => new BoundType(t)), bindingActor.Item3);
        }
        public TcpChannel(GatewayInitiator initiator, TcpConnection connection, object tag, Tuple <IActorRef, TaggedType[], ActorBindingFlags> bindingActor)
        {
            // open by registerd token.
            _initiator  = initiator;
            _logger     = initiator.CreateChannelLogger(connection.RemoteEndPoint, connection.Socket);
            _socket     = connection.Socket;
            _connection = connection;
            _tag        = tag;

            BindActor(bindingActor.Item1, bindingActor.Item2.Select(t => new BoundType(t)), bindingActor.Item3);
        }
        public UdpChannel(GatewayInitiator initiator, object connection, object tag, Tuple<IActorRef, TaggedType[], ActorBindingFlags> bindingActor)
        {
            var netConnection = (NetConnection)connection;
            _initiator = initiator;
            _logger = _initiator.CreateChannelLogger(netConnection.RemoteEndPoint, connection);
            _connection = netConnection;
            _packetSerializer = initiator.PacketSerializer;
            _tag = tag;

            if (bindingActor != null)
                BindActor(bindingActor.Item1, bindingActor.Item2.Select(t => new BoundType(t)), bindingActor.Item3);
        }
 public TcpChannel(GatewayInitiator initiator, Socket socket, object tag)
 {
     // open by client connection.
     _initiator  = initiator;
     _logger     = _initiator.CreateChannelLogger(socket.RemoteEndPoint, socket);
     _socket     = socket;
     _connection = new TcpConnection(_logger, _socket)
     {
         Settings = initiator.ConnectionSettings
     };
     _tag = tag;
 }
        public UdpChannel(GatewayInitiator initiator, object connection, object tag, Tuple <IActorRef, TaggedType[], ActorBindingFlags> bindingActor)
        {
            var netConnection = (NetConnection)connection;

            _initiator        = initiator;
            _logger           = _initiator.CreateChannelLogger(netConnection.RemoteEndPoint, connection);
            _connection       = netConnection;
            _packetSerializer = initiator.PacketSerializer;
            _tag = tag;

            if (bindingActor != null)
            {
                BindActor(bindingActor.Item1, bindingActor.Item2.Select(t => new BoundType(t)), bindingActor.Item3);
            }
        }