Question: Given the following piece of Java code, assuming that address is an InetAddress instance and port is an int variable and both of them have
Given the following piece of Java code, assuming that address is an InetAddress instance and port is an int variable and both of them have been assigned with appropriate value, this piece of code sends out a UDP packet while calling udpServerSocket.sendudpPacket by using address as the ip address and port as the port number.
udpPacket new DatagramPacketbuf buflength, address, port;
udpServerSocket.sendudpPacket;
Given the following piece of Java code, assuming that address is an InetAddress instance and port is an int variable and both of them have been assigned with appropriate value, this piece of code sends out a UDP packet while calling udpServerSocket.sendudpPacket by using address as the ip address and port as the port number.
udpPacket new DatagramPacketbuf buflength, address, port;
udpServerSocket.sendudpPacket;
destination, source
destination, destination
source, source
source, destination
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
