Ejemplo n.º 1
0
 internal override Connection CreateConnection(
     IConnectionManager manager,
     MultiStreamTransceiverWithUnderlyingTransceiver transceiver,
     IConnector?connector,
     string connectionId,
     ObjectAdapter?adapter) =>
 new WSConnection(manager, this, transceiver, connector, connectionId, adapter);
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
        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));
        }