chapter 33: Networking Flashcards
basic understanding of internet terminology server sockets, client sockets, stream sockets, make a client/server application, InetAddress, develop applets that communicate with the server, send and receive objects on a network, make a tic tac toe game played on the internet
Internet Protocol (IP)
A numeric address that uniquely identifies a computer on the internet. ex: 130.254.204.33
The IP is a low-level protocol for delivering data from one computer to another across the internet in packets.
What makes an IP address?
four dotted decimal numbers between 0 and 255
ex: 130.254.204.33
What is a domain name?
An identification string … Domain names serve as humanly memorable names for Internet participants, like computers, networks, and services.
www.google.com
“.com” is the top-level domain name. “google.com” is the domain name registered to google, and “google” is considered a second-level domain name. the “www” is the name of the web server (web host server) at the google.com domain.
www.google.com is a “fully qualified domain name (FQDN)”
what is a domain name server? (DNS)
a domain name server on the internet translates host names into IP addresses.
when a computer contacts google.com, it first asks the DNS to translate this domain name into a numeric IP address and then sends the request using the IP address.
What two higher-level protocols are using in conjunction with the Internet Protocol (IP) used to deliver data from one computer to another?
- Transmission Control Protocol (TCP)
- User Datagram Protocol (UDP)
What does TCP stand for and what does it do?
-Transmission Control Protocol (TCP)
enables two hosts to establish a connection and exchange streams of data
guarantees delivery of data and also guarantees that packets will be delivered in the same order in which they were sent.
stream-based communcations use TCP
What does UDP stand for and what does it do?
-User Datagram Protocol (UDP)
UDP is a standard, low-overhead, connectionless, host-to-host protocol that is used over the IP.
UDP allows an application program on one computer to send a datagram to an application program on another computer.
packet-based communications use UDP
What kinds of communication does java support, stream or packet?
java supports stream-based and packet-based.
however, TCP can detect lost transmissions and resubmit them. UDP cannot guarantee lossless transmission, so stream-based communication (TCP) is usually used.
What java class enables us to create a server socket?
ServerSocket
What java class enables us to create a client socket?
Socket
How do two programs on the Internet communicate with one another?
Two programs on the internet communicate through a server socket and a client socket using I/O streams.
What is a socket?
A socket is an endpoint of logical connections between two hosts and can be used to send and receive data.
java treats socket communications much as it treats I/O operations; thus, programs can read from or write to sockets as easily as they can read from or write to files.
How do the client and server communicate?
the client and the server communicate through sockets
How do we establish a server?
We must create a server socket and attach it to a port.
What is a port?
A port is where the server listens for connections.
It identifies the TCP server on the socket.