Receiving UDP Datagrams
Construct a DatagramSocket object on the port on which you want to listen.
Pass an empty DatagramPacket object to the DatagramSocket's receive() method.
public synchronized void receive(DatagramPacket dp) throws IOException
The calling thread blocks until a datagram is received.
Back to first slide
View graphic version