コード例 #1
0
 internal override Connection CreateConnection(
     IConnectionManager manager,
     MultiStreamTransceiverWithUnderlyingTransceiver transceiver,
     IConnector?connector,
     string connectionId,
     ObjectAdapter?adapter) =>
 new WSConnection(manager, this, transceiver, connector, connectionId, adapter);
コード例 #2
0
ファイル: TcpAcceptor.cs プロジェクト: wubo2018/ice
        public async ValueTask <Connection> AcceptAsync()
        {
            Socket fd = await _socket.AcceptAsync().ConfigureAwait(false);

            ITransceiver transceiver = ((TcpEndpoint)Endpoint).CreateTransceiver(fd, _adapter.Name);

            MultiStreamTransceiverWithUnderlyingTransceiver multiStreamTranceiver = Endpoint.Protocol switch
            {
                Protocol.Ice1 => new LegacyTransceiver(transceiver, Endpoint, _adapter),
                _ => new SlicTransceiver(transceiver, Endpoint, _adapter)
            };

            return(((TcpEndpoint)Endpoint).CreateConnection(_manager, multiStreamTranceiver, null, "", _adapter));
        }
コード例 #3
0
ファイル: TcpConnector.cs プロジェクト: principleWindows/ice
        public Connection Connect(string connectionId)
        {
            ITransceiver transceiver = _endpoint.CreateTransceiver(this, _addr, _proxy);

            MultiStreamTransceiverWithUnderlyingTransceiver multiStreamTranceiver = _endpoint.Protocol switch
            {
                Protocol.Ice1 => new LegacyTransceiver(transceiver, _endpoint, null),
                _ => new SlicTransceiver(transceiver, _endpoint, null)
            };

            return(_endpoint.CreateConnection(_endpoint.Communicator.OutgoingConnectionFactory,
                                              multiStreamTranceiver,
                                              this,
                                              connectionId,
                                              null));
        }