public class AnonPureUDPChannel extends AbstractAnonUDPChannel
HTTP, SMTP, SOCKS, TCP, UDP, UDP_OVER_TCP, UDP_OVER_UDP, VPN
Constructor and Description |
---|
AnonPureUDPChannel(UDPMultiplexer multiplexer) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the channel and releases all resources used.
|
int |
getOutputBlockSize()
Returns a value that indicates the current optimum size of data to write.
|
boolean |
isClosed()
Returns if the channel is already closed, i.e. no data can be sent / recieved any more on this channel.
|
int |
readPacket(byte[] payload,
int off,
int len)
Reads the payload of a whole UDP packet sent from the peer.
|
void |
setDestination(java.lang.String host,
int port) |
void |
writePacket(byte[] payload) |
void |
writePacket(byte[] payload,
int offset,
int length) |
getInputStream, getOutputStream, setSentAutoFlushDelay, setSourcePort
public AnonPureUDPChannel(UDPMultiplexer multiplexer)
public void setDestination(java.lang.String host, int port)
setDestination
in interface IAnonUDPChannel
setDestination
in class AbstractAnonUDPChannel
host
- the domain name of the target hostport
- the target port numberpublic void writePacket(byte[] payload, int offset, int length) throws java.io.IOException
java.io.IOException
public void writePacket(byte[] payload) throws java.io.IOException
writePacket
in interface IAnonUDPChannel
writePacket
in class AbstractAnonUDPChannel
java.io.IOException
public int readPacket(byte[] payload, int off, int len) throws java.io.IOException, UDPPacketStreamDesynchronisationException, UDPPacketToLargeException
IAnonUDPChannel
java.io.IOException
UDPPacketStreamDesynchronisationException
UDPPacketToLargeException
public int getOutputBlockSize()
AnonChannel
public void close()
AnonChannel
public boolean isClosed()
AnonChannel
true
, if the channel is already closedCopyright © 2023. All rights reserved.