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 Transport
Transport.ConnectListener -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate final ProtocolEndpointUDPprivate static final LogIDsprivate byte[][]Fields inherited from interface 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_MEGA_TURBO, 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.booleanisClosed()booleanisSOCKS()booleanisTCP()voidsetTransportModes(int send_mode, int recv_mde) Set the transport to the given speed modes.Methods inherited from class TransportImpl
bindConnection, connectedInbound, connectedOutbound, getEncryption, getFilter, getPluginProxy, getUserData, isEncrypted, isReadyForRead, isReadyForWrite, read, readFailed, readyForRead, readyForWrite, setAlreadyRead, setFilter, setReadyForRead, setTrace, setUserData, unbindConnection, write, writeFailedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Transport
getTransportMode, setTransportMode
-
Field Details
-
LOGID
-
endpoint
-
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
-
setTransportModes
public void setTransportModes(int send_mode, int recv_mde) Description copied from interface:TransportSet the transport to the given speed modes. -
connectOutbound
public void connectOutbound(ByteBuffer initial_data, Transport.ConnectListener listener, int priority) Description copied from interface:TransportKick off an outbound connection- Parameters:
listener-
-
close
-
isClosed
public boolean isClosed()
-