Recall & Review
beginner
What is a socket in computer networking?
A socket is an endpoint for sending or receiving data across a computer network. It allows two programs to communicate over the internet or a local network.
Click to reveal answer
beginner
What are the two main types of sockets?
The two main types of sockets are TCP sockets, which provide reliable, connection-oriented communication, and UDP sockets, which provide faster, connectionless communication without guaranteed delivery.
Click to reveal answer
beginner
What is the role of an IP address and port number in socket programming?
An IP address identifies a device on the network, and a port number identifies a specific application or service on that device. Together, they direct data to the right place.
Click to reveal answer
intermediate
What does it mean to 'bind' a socket?
Binding a socket means assigning it a specific IP address and port number so it can listen for incoming data on that address and port.
Click to reveal answer
beginner
Explain the difference between a server socket and a client socket.
A server socket waits and listens for incoming connection requests from clients. A client socket initiates a connection to the server to communicate.
Click to reveal answer
What type of socket provides reliable, ordered communication?
✗ Incorrect
TCP sockets ensure data is delivered reliably and in order.
Which of the following is NOT part of a socket's address?
✗ Incorrect
MAC address is a hardware address, not used in socket addressing.
What does the 'listen' operation do in socket programming?
✗ Incorrect
Listening means the server socket waits for clients to connect.
Which socket type is faster but does not guarantee delivery?
✗ Incorrect
UDP sockets send data quickly but without delivery guarantees.
What is the purpose of a port number in socket programming?
✗ Incorrect
Port numbers direct data to the correct application on a device.
Describe what a socket is and how it is used in network communication.
Think about how two programs talk over the internet.
You got /4 concepts.
Explain the difference between TCP and UDP sockets and when you might use each.
Consider reliability versus speed.
You got /4 concepts.