|
|||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--java.net.DatagramSocket | +--mdw.nbio.NonblockingDatagramSocket | +--mdw.nbio.NonblockingMulticastSocket
NonblockingMulticastSocket provides non-blocking multicast datagram I/O. NOTE: packets cannot be received on a socket once connect() is called, due to the semantics of connect() for multicast sockets. Instead, applications should generally use joinGroup(), and then explicitly specify the group address as the destination in all the outbound packets.
インタフェース mdw.nbio.Selectable から継承したフィールド |
ACCEPT_READY, CONNECT_READY, READ_READY, SELECT_ERROR, WRITE_READY |
コンストラクタの概要 | |
NonblockingMulticastSocket()
Create a NonblockingMulticastSocket bound to any available port. |
|
NonblockingMulticastSocket(int port)
|
|
NonblockingMulticastSocket(int port,
java.net.InetAddress laddr)
Create a NonblockingMulticastSocket bound to the given port and the given local address. |
メソッドの概要 | |
java.net.InetAddress |
getInterface()
Get the interface associated with this multicast socket |
int |
getTimeToLive()
get the multicast ttl |
void |
joinGroup(java.net.InetAddress addr)
Join a multicast group |
void |
leaveGroup(java.net.InetAddress addr)
Leave a multicast group |
void |
seeLocalMessages(boolean state)
This sets the state of the IP_MULTICAST_LOOP option on the underlying socket. |
void |
setInterface(java.net.InetAddress addr)
Set the interface associated with this socket |
void |
setTimeToLive(int ttl)
set the time to live |
クラス mdw.nbio.NonblockingDatagramSocket から継承したメソッド |
close, connect, connect, disconnect, getInetAddress, getLocalAddress, getLocalPort, getPort, getReceiveBufferSize, getSendBufferSize, nbReceive, nbReceive, nbSend, nbSend, nbSend, receive, send, setReceiveBufferSize, setSendBufferSize |
クラス java.net.DatagramSocket から継承したメソッド |
getSoTimeout, setDatagramSocketImplFactory, setSoTimeout |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
public NonblockingMulticastSocket() throws java.io.IOException
public NonblockingMulticastSocket(int port) throws java.io.IOException
public NonblockingMulticastSocket(int port, java.net.InetAddress laddr) throws java.io.IOException
メソッドの詳細 |
public void joinGroup(java.net.InetAddress addr) throws java.io.IOException
public void leaveGroup(java.net.InetAddress addr) throws java.io.IOException
public int getTimeToLive() throws java.io.IOException
public void setTimeToLive(int ttl) throws java.io.IOException
public java.net.InetAddress getInterface()
public void setInterface(java.net.InetAddress addr) throws java.io.IOException
public void seeLocalMessages(boolean state) throws java.io.IOException
NOTE: The behavior of this is somewhat strange for two multicast listeners on the same physical machine. Ideally, this should be an incoming filter - each socket should throw out packets that it sent out, and not deliver them to the application.
Unfortunately, this instead seems to be an outbound filter - all packets sent out on a socket with IP_MULTICAST_LOOP turned off will be invisible to all sockets on the local machine - regardless of whether or not these other sockets have specified IP_MULTICAST_LOOP=false.
|
|||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |