|
|||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||
| 概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||
java.lang.Object
|
+--java.net.DatagramSocket
|
+--mdw.nbio.NonblockingDatagramSocket
A NonblockingDatagramSocket provides non-blocking UDP (datagram) I/O.
| インタフェース mdw.nbio.Selectable から継承したフィールド |
ACCEPT_READY, CONNECT_READY, READ_READY, SELECT_ERROR, WRITE_READY |
| コンストラクタの概要 | |
NonblockingDatagramSocket()
Create a NonblockingDatagramSocket bound to any available port. |
|
NonblockingDatagramSocket(int port)
Create a NonblockingDatagramSocket bound to the given port. |
|
NonblockingDatagramSocket(int port,
java.net.InetAddress laddr)
Create a NonblockingDatagramSocket bound to the given port and the given local address. |
|
| メソッドの概要 | |
void |
close()
Close this NonblockingDatagramSocket. |
void |
connect(java.net.InetAddress address,
int port)
Connect this NonblockingDatagramSocket to the given address and port. |
void |
connect(java.lang.String host,
int port)
|
void |
disconnect()
|
java.net.InetAddress |
getInetAddress()
Return the remote address to which this socket is bound. |
java.net.InetAddress |
getLocalAddress()
Return the local address to which this socket is bound. |
int |
getLocalPort()
Return the local port to which this socket is bound. |
int |
getPort()
Return the remote port to which this socket is bound. |
int |
getReceiveBufferSize()
|
int |
getSendBufferSize()
|
int |
nbReceive(byte[] data,
int offset,
int length)
Receive a datagram from this socket. |
int |
nbReceive(java.net.DatagramPacket p)
Receive a datagram from this socket. |
int |
nbSend(byte[] data,
int offset,
int length)
Sends a datagram packet from this socket. |
int |
nbSend(byte[] data,
int offset,
int length,
java.net.InetAddress addr,
int port)
Sends a datagram packet from this socket. |
int |
nbSend(java.net.DatagramPacket p)
Sends a datagram packet from this socket. |
void |
receive(java.net.DatagramPacket p)
This method is provided for convenience and mimics blocking behavior by invoking the nonblocking nbReceive() operation. |
void |
send(java.net.DatagramPacket p)
This method is provided for convenience and mimics blocking behavior by invoking the nonblocking nbSend() operation. |
void |
setReceiveBufferSize(int size)
|
void |
setSendBufferSize(int size)
|
| クラス java.net.DatagramSocket から継承したメソッド |
getSoTimeout, setDatagramSocketImplFactory, setSoTimeout |
| クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
public NonblockingDatagramSocket()
throws java.io.IOException
public NonblockingDatagramSocket(int port)
throws java.io.IOException
public NonblockingDatagramSocket(int port,
java.net.InetAddress laddr)
throws java.io.IOException
| メソッドの詳細 |
public void close()
java.net.DatagramSocket 内の close
public void connect(java.net.InetAddress address,
int port)
throws java.lang.IllegalArgumentException
java.net.DatagramSocket 内の connect
public void connect(java.lang.String host,
int port)
throws java.net.UnknownHostException
public void disconnect()
java.net.DatagramSocket 内の disconnectpublic java.net.InetAddress getInetAddress()
java.net.DatagramSocket 内の getInetAddresspublic java.net.InetAddress getLocalAddress()
java.net.DatagramSocket 内の getLocalAddresspublic int getPort()
java.net.DatagramSocket 内の getPortpublic int getLocalPort()
java.net.DatagramSocket 内の getLocalPort
public int nbReceive(java.net.DatagramPacket p)
throws java.io.IOException
public int nbReceive(byte[] data,
int offset,
int length)
throws java.io.IOException
public int nbSend(java.net.DatagramPacket p)
throws java.io.IOException
public int nbSend(byte[] data,
int offset,
int length,
java.net.InetAddress addr,
int port)
throws java.io.IOException
public int nbSend(byte[] data,
int offset,
int length)
throws java.io.IOException
public int getReceiveBufferSize()
throws java.net.SocketException
java.net.DatagramSocket 内の getReceiveBufferSize
public int getSendBufferSize()
throws java.net.SocketException
java.net.DatagramSocket 内の getSendBufferSize
public void setReceiveBufferSize(int size)
throws java.net.SocketException
java.net.DatagramSocket 内の setReceiveBufferSize
public void setSendBufferSize(int size)
throws java.net.SocketException
java.net.DatagramSocket 内の setSendBufferSize
public void send(java.net.DatagramPacket p)
throws java.io.IOException
Use of this method is not recommended and is provided only for compatibility with java.net.DatagramSocket.
java.net.DatagramSocket 内の send
public void receive(java.net.DatagramPacket p)
throws java.io.IOException
Use of this method is not recommended and is provided only for compatibility with java.net.DatagramSocket.
java.net.DatagramSocket 内の receive
|
|||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||
| 概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||