Take-home quizzes: Week 12, 13 Flashcards
Which classes are used for connection-less socket programming?
DatagramSocket and DatagramPacket
What Java package contains classes and interfaces for networking?
java.net
How do socket pairs use the source port number?
The source port number acts as a return address for the requesting application
What is the purpose of this code:
ServerSocket server = new ServerSocket(8000);
Creates a server side socket on port 8000
What code does the client use to request a connection with the server?
s = new Socket(host, port);
At the client side, which stream should be declared assuming the client needs only to send data to the server
DataOutputStream
If the server uses writeDouble, what should the client use to read the value?
readDouble
T/F - DNS resolves Internet names to IP addresses
True
T/F - FTP transfers email messages and attachments
False
What is the purpose of the DNS application?
It translates a host name (URL) into an IP address
T/F -HTTP enables devices on a network to obtain IP addresses
False
T/F - Telnet provides remote access to servers and networking devices
True
T/F - SMTP transfers web pages from web servers to clients
False. HTTP does that
Here is a URL http://www.cisco.com/index.html
What part represents the top-level DNS domain?
.com
Port 80 and 443 are used by what protocol? What is the individual function of the 2 ports?
They’re used by HTTP. Port 80 is used for unsecured data transfers, port 443 is used by secured data transfers