class DatagramSocketFactory.PrDatagramSocket
extends java.net.DatagramSocket
Modifier and Type | Field and Description |
---|---|
private java.net.DatagramSocket |
socket |
Constructor and Description |
---|
PrDatagramSocket(java.net.DatagramSocket socket) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
connect(java.net.InetAddress address,
int port) |
void |
disconnect() |
java.net.InetAddress |
getInetAddress() |
java.net.InetAddress |
getLocalAddress() |
int |
getLocalPort() |
int |
getPort() |
int |
getReceiveBufferSize() |
int |
getSendBufferSize() |
int |
getSoTimeout() |
void |
receive(java.net.DatagramPacket p) |
void |
send(java.net.DatagramPacket p) |
void |
setReceiveBufferSize(int size) |
void |
setSendBufferSize(int size) |
void |
setSoTimeout(int timeout) |
public PrDatagramSocket(java.net.DatagramSocket socket) throws java.net.SocketException
java.net.SocketException
public void connect(java.net.InetAddress address, int port)
connect
in class java.net.DatagramSocket
public void disconnect()
disconnect
in class java.net.DatagramSocket
public java.net.InetAddress getInetAddress()
getInetAddress
in class java.net.DatagramSocket
public int getPort()
getPort
in class java.net.DatagramSocket
public void send(java.net.DatagramPacket p) throws java.io.IOException
send
in class java.net.DatagramSocket
java.io.IOException
public void receive(java.net.DatagramPacket p) throws java.io.IOException
receive
in class java.net.DatagramSocket
java.io.IOException
public java.net.InetAddress getLocalAddress()
getLocalAddress
in class java.net.DatagramSocket
public int getLocalPort()
getLocalPort
in class java.net.DatagramSocket
public void setSoTimeout(int timeout) throws java.net.SocketException
setSoTimeout
in class java.net.DatagramSocket
java.net.SocketException
public int getSoTimeout() throws java.net.SocketException
getSoTimeout
in class java.net.DatagramSocket
java.net.SocketException
public void setSendBufferSize(int size) throws java.net.SocketException
setSendBufferSize
in class java.net.DatagramSocket
java.net.SocketException
public int getSendBufferSize() throws java.net.SocketException
getSendBufferSize
in class java.net.DatagramSocket
java.net.SocketException
public void setReceiveBufferSize(int size) throws java.net.SocketException
setReceiveBufferSize
in class java.net.DatagramSocket
java.net.SocketException
public int getReceiveBufferSize() throws java.net.SocketException
getReceiveBufferSize
in class java.net.DatagramSocket
java.net.SocketException
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.net.DatagramSocket