MulticastSocket.send
Class Overview | Class Members |
This Package |
All Packages
public synchronized void send( DatagramPacket p,
byte ttl ) throws IOException
Parameters
- p
- is the packet to be sent. The packet should contain
the destination multicast ip address and the data to be sent.
One does not need to be the member of the group to send
packets to a destination multicast address.
- ttl
- optional time to live for multicast packet.
default ttl is 1.
Description
Sends a datagram packet to the destination, with a TTL (time-
to-live) other than the default for the socket. This method
need only be used in instances where a particular TTL is desired;
otherwise it is preferable to set a TTL once on the socket, and
use that default TTL for all packets. This method does not
alter the default TTL for the socket.
Exceptions
IOException
is raised if an error occurs i.e
error while setting ttl.
See Also
send, receive