Code example for DatagramSocket

Methods: getSoTimeout

		return socket.getLocalPort();
	/** Gets the socket timeout. */ 
	public int getSoTimeout() throws { 
		return socket.getSoTimeout();
	 * Enables/disables socket timeout with the specified timeout, in 
	 * milliseconds. 
	public void setSoTimeout(int timeout) throws {
	/** Receives a datagram packet from this socket. */ 
	public void receive(UdpPacket pkt) throws {
		DatagramPacket dgram = pkt.getDatagramPacket();
Stop searching for code, let great code find you!  Add Codota to your java IDE