Package com.biglybt.net.udp.uc
Interface PRUDPPacketHandler
- All Known Implementing Classes:
PRUDPPacketHandlerImpl
,PRUDPPacketHandlerSocks
,PRUDPPacketHandlerSupport
public interface PRUDPPacketHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
destroy()
default InetAddress
int
getPort()
getStats()
boolean
openSession
(InetSocketAddress target) void
primordialSend
(byte[] data, InetSocketAddress target) void
void
send
(PRUDPPacket request_packet, InetSocketAddress destination_address) Send onlyvoid
sendAndReceive
(PRUDPPacket request_packet, InetSocketAddress destination_address, PRUDPPacketReceiver receiver, long timeout, int priority) Asynchronous send and receivesendAndReceive
(PasswordAuthentication auth, PRUDPPacket request_packet, InetSocketAddress destination_address) Synchronous send and receivesendAndReceive
(PasswordAuthentication auth, PRUDPPacket request_packet, InetSocketAddress destination_address, long timeout_millis) sendAndReceive
(PasswordAuthentication auth, PRUDPPacket request_packet, InetSocketAddress destination_address, long timeout_millis, int priority) void
setDelays
(int send_delay, int receive_delay, int queued_request_timeout) void
setExplicitBindAddress
(InetAddress address, boolean autoDelegate) void
setRequestHandler
(PRUDPRequestHandler request_handler)
-
Field Details
-
PRIORITY_LOW
static final int PRIORITY_LOW- See Also:
-
PRIORITY_MEDIUM
static final int PRIORITY_MEDIUM- See Also:
-
PRIORITY_HIGH
static final int PRIORITY_HIGH- See Also:
-
PRIORITY_IMMEDIATE
static final int PRIORITY_IMMEDIATE- See Also:
-
-
Method Details
-
sendAndReceive
void sendAndReceive(PRUDPPacket request_packet, InetSocketAddress destination_address, PRUDPPacketReceiver receiver, long timeout, int priority) throws PRUDPPacketHandlerException Asynchronous send and receive- Parameters:
request_packet
-destination_address
-receiver
-- Throws:
PRUDPPacketHandlerException
-
sendAndReceive
PRUDPPacket sendAndReceive(PasswordAuthentication auth, PRUDPPacket request_packet, InetSocketAddress destination_address) throws PRUDPPacketHandlerException Synchronous send and receive- Parameters:
auth
-request_packet
-destination_address
-- Returns:
- Throws:
PRUDPPacketHandlerException
-
sendAndReceive
PRUDPPacket sendAndReceive(PasswordAuthentication auth, PRUDPPacket request_packet, InetSocketAddress destination_address, long timeout_millis) throws PRUDPPacketHandlerException - Throws:
PRUDPPacketHandlerException
-
sendAndReceive
PRUDPPacket sendAndReceive(PasswordAuthentication auth, PRUDPPacket request_packet, InetSocketAddress destination_address, long timeout_millis, int priority) throws PRUDPPacketHandlerException - Throws:
PRUDPPacketHandlerException
-
send
void send(PRUDPPacket request_packet, InetSocketAddress destination_address) throws PRUDPPacketHandlerException Send only- Parameters:
request_packet
-destination_address
-- Throws:
PRUDPPacketHandlerException
-
getRequestHandler
PRUDPRequestHandler getRequestHandler() -
setRequestHandler
-
primordialSend
- Throws:
PRUDPPacketHandlerException
-
hasPrimordialHandler
boolean hasPrimordialHandler() -
addPrimordialHandler
-
removePrimordialHandler
-
getPort
int getPort() -
getBindIP
-
getCurrentBindAddress
InetAddress getCurrentBindAddress() -
getExplicitBindAddress
InetAddress getExplicitBindAddress() -
setExplicitBindAddress
-
setDelays
void setDelays(int send_delay, int receive_delay, int queued_request_timeout) -
getStats
PRUDPPacketHandlerStats getStats() -
openSession
- Throws:
PRUDPPacketHandlerException
-
closeSession
- Throws:
PRUDPPacketHandlerException
-
destroy
void destroy()
-