Search in sources :

Example 1 with MessageStreamEncoderAdapter

use of com.biglybt.pifimpl.local.messaging.MessageStreamEncoderAdapter in project BiglyBT by BiglySoftware.

the class ConnectionManagerImpl method createConnection.

@Override
public Connection createConnection(InetSocketAddress remote_address, MessageStreamEncoder encoder, MessageStreamDecoder decoder) {
    ConnectionEndpoint connection_endpoint = new ConnectionEndpoint(remote_address);
    connection_endpoint.addProtocol(ProtocolEndpointFactory.createEndpoint(ProtocolEndpoint.PROTOCOL_TCP, remote_address));
    com.biglybt.core.networkmanager.NetworkConnection core_conn = NetworkManager.getSingleton().createConnection(connection_endpoint, new MessageStreamEncoderAdapter(encoder), new MessageStreamDecoderAdapter(decoder), false, false, null);
    return new ConnectionImpl(core_conn, false);
}
Also used : ConnectionEndpoint(com.biglybt.core.networkmanager.ConnectionEndpoint) MessageStreamDecoderAdapter(com.biglybt.pifimpl.local.messaging.MessageStreamDecoderAdapter) MessageStreamEncoderAdapter(com.biglybt.pifimpl.local.messaging.MessageStreamEncoderAdapter)

Aggregations

ConnectionEndpoint (com.biglybt.core.networkmanager.ConnectionEndpoint)1 MessageStreamDecoderAdapter (com.biglybt.pifimpl.local.messaging.MessageStreamDecoderAdapter)1 MessageStreamEncoderAdapter (com.biglybt.pifimpl.local.messaging.MessageStreamEncoderAdapter)1