Class UDPTransport
java.lang.Object
com.biglybt.core.networkmanager.impl.TransportImpl
com.biglybt.core.networkmanager.impl.udp.UDPTransport
- All Implemented Interfaces:
Transport,TransportBase
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.biglybt.core.networkmanager.Transport
Transport.ConnectListener -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate final ProtocolEndpointUDPprivate static final LogIDsprivate byte[][]private intFields inherited from interface com.biglybt.core.networkmanager.Transport
CR_BAD_PIECE_DATA, CR_DUPLICATE_PEER_ID, CR_INTERNAL_CONNECT_FAILED, CR_INVALID_INFO_HASH, CR_IP_BLOCKED, CR_NO_MEMORY, CR_NONE, CR_NOT_INTERESTED_UPLOAD_ONLY, CR_PEER_CHURN, CR_PORT_BLOCKED, CR_PROTOCOL_BLOCKED, CR_SELF_CONNECTION, CR_STOPPED_OR_REMOVED, CR_TIMEOUT, CR_TIMEOUT_ACTIVITY, CR_TIMEOUT_HANDSHAKE, CR_TIMEOUT_INTEREST, CR_TIMEOUT_REQUEST, CR_TOO_MANY_CONNECTIONS, CR_TOO_MANY_FILES, CR_UPLOAD_TO_UPLOAD, KEY_CLOSE_REASON, TRANSPORT_MODE_FAST, TRANSPORT_MODE_NORMAL, TRANSPORT_MODE_TURBO -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedUDPTransport(ProtocolEndpointUDP _endpoint, byte[][] _shared_secrets) protectedUDPTransport(ProtocolEndpointUDP _endpoint, TransportHelperFilter _filter) -
Method Summary
Modifier and TypeMethodDescriptionvoidClose the transport connection.voidconnectOutbound(ByteBuffer initial_data, Transport.ConnectListener listener, int priority) Kick off an outbound connectionGet a textual description for this transport.intGet the socket channel used by the transport.intGet the transport's speed mode.booleanisClosed()booleanisSOCKS()booleanisTCP()voidsetTransportMode(int mode) Set the transport to the given speed mode.Methods inherited from class com.biglybt.core.networkmanager.impl.TransportImpl
bindConnection, connectedInbound, connectedOutbound, getEncryption, getFilter, getPluginProxy, getUserData, isEncrypted, isReadyForRead, isReadyForWrite, read, readFailed, readyForRead, readyForWrite, setAlreadyRead, setFilter, setReadyForRead, setTrace, setUserData, unbindConnection, write, writeFailed
-
Field Details
-
LOGID
-
endpoint
-
transport_mode
private int transport_mode -
closed
private volatile boolean closed
-
-
Constructor Details
-
UDPTransport
-
UDPTransport
-
-
Method Details
-
isTCP
public boolean isTCP() -
isSOCKS
public boolean isSOCKS()- Specified by:
isSOCKSin interfaceTransport- Overrides:
isSOCKSin classTransportImpl
-
getProtocol
- Specified by:
getProtocolin interfaceTransport- Overrides:
getProtocolin classTransportImpl
-
getTransportEndpoint
Description copied from interface:TransportGet the socket channel used by the transport.- Returns:
- the socket channel
-
getTransportStartpoint
- Specified by:
getTransportStartpointin interfaceTransport- Overrides:
getTransportStartpointin classTransportImpl
-
getMssSize
public int getMssSize() -
getDescription
Description copied from interface:TransportBaseGet a textual description for this transport.- Returns:
- description
-
setTransportMode
public void setTransportMode(int mode) Description copied from interface:TransportSet the transport to the given speed mode.- Parameters:
mode- to change to
-
getTransportMode
public int getTransportMode()Description copied from interface:TransportGet the transport's speed mode.- Returns:
- current mode
-
connectOutbound
public void connectOutbound(ByteBuffer initial_data, Transport.ConnectListener listener, int priority) Description copied from interface:TransportKick off an outbound connection- Parameters:
listener-
-
close
Description copied from interface:TransportClose the transport connection. -
isClosed
public boolean isClosed()
-