Code example for MulticastSocket

Methods: setTimeToLive

0
		mCacheSize = cacheSize;
	} 
	 
	/** Sets the Time To Live of the UDP packets. */ 
	public void setTimeToLive(int ttl) throws IOException {
		mSocket.setTimeToLive(ttl);
	} 
 
	/** Sets the destination address and to which the packets will be sent. */ 
	public void setDestination(InetAddress dest, int dport) {
		mPort = dport;
		for (int i=0;i<mBufferCount;i++) {
			mPackets[i].setPort(dport);
			mPackets[i].setAddress(dest);
		} 
	} 
 
	public int getPort() { 
		return mPort;
	}