Class UDPConnection
java.lang.Object
com.biglybt.core.networkmanager.impl.udp.UDPConnection
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate intprivate final AESemaphoreprivate final Listprivate final UDPConnectionSetprivate UDPTransportHelper -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedUDPConnection(UDPConnectionSet _set, int _id) protectedUDPConnection(UDPConnectionSet _set, int _id, UDPTransportHelper _transport) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanRead()protected booleancanWrite()protected voidprotected voidcloseSupport(String reason) protected voidprotected voidfailedSupport(Throwable reason) protected intgetID()protected UDPSelectorprotected UDPTransportHelperprotected booleanbooleanprotected voidpoll()protected intread(ByteBuffer buffer) protected voidreceive(ByteBuffer data) protected voidsent()protected voidsetID(int _id) protected voidsetSecret(byte[] session_secret) protected voidsetTransport(UDPTransportHelper _transport) protected intwrite(ByteBuffer[] buffers, int offset, int length)
-
Field Details
-
set
-
id
private int id -
transport
-
read_buffers
-
read_buffer_sem
-
connected
private volatile boolean connected
-
-
Constructor Details
-
UDPConnection
-
UDPConnection
-
-
Method Details
-
getSelector
-
getID
protected int getID() -
setID
protected void setID(int _id) -
isIncoming
public boolean isIncoming() -
setSecret
protected void setSecret(byte[] session_secret) -
setTransport
-
getTransport
-
receive
- Throws:
IOException
-
sent
protected void sent() -
canRead
protected boolean canRead() -
canWrite
protected boolean canWrite() -
write
- Throws:
IOException
-
read
- Throws:
IOException
-
close
-
failed
-
closeSupport
-
failedSupport
-
isConnected
protected boolean isConnected() -
poll
protected void poll()
-