We say that in network programming a socket should be at least bound to a local socket

Question:

We say that in network programming a socket should be at least bound to a local socket address. The first constructor of the DatagramSocket class (see Table 25.10) has no parameters. Can you explain how it is bound to the local socket address when used at the client site?

Table 25.10 Some methods in DatagramSocket class public class java.net.DatagramSocket extends java.lang.Object // Constructors public DatagramSocket () public DatagramSocket (int localPort) public DatagramSocket (int localPort, InetAddress localAddr) // Instance Methods public void send (DatagramPacket sendPacket) public void receive (DatagramPacket recvPacket) public void close (0

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: