Code example for Thread

Methods: start

	 * Start the IPDiscovery thread 
	public void start() { 
	protected void handle_announce() { 
	protected volatile boolean shutdown_; // /< signal to close down thread
	protected InetAddress local_addr_; // /< address for bind() to receive beacons
	protected short port_; // /< local and remote
	protected InetAddress remote_addr_; // /< whether unicast, multicast, or broadcast
	protected int mcast_ttl_; // /< TTL hop count for multicast option
	protected DatagramSocket socket_; // /< the socket for beacons in- and out-bound
	protected boolean persist_; // /< whether to exit thread on send/recv failures
Connect your IDE to all the code out there  Get Codota for Java