CS241 - N (Socket Programming)

¡Supera tus tareas y exámenes ahora con Quizwiz!

What type of socket does the below best describe: The sender attaches IP destination address and port number to each packet

UDP sockets

What type of socket does the below best describe: The transmitted data may be lost, or received out of order

UDP sockets

What is a socket?

A door between an application process, and an end-to-end transport protocol, expressed as (IP address, port number) pairs

Why does the server TCP socket create a new socket when contacted by a client?

It allows the server process to communicate with that specific client. This allows the server to talk with multiple clients via TCP!

After receiving a UDP packet, what does the receiver use to determine the socket the data goes to?

Just the port number

Describe how socket programming/communication under TCP works

Pre-requisites: -Server process is running -Server has socket to allow for incoming communication The client: -Creates a TCP socket, specifying IP address + port number of server process -This socket establishes connection with server TCP socket The server, when contacted by the client: -Server TCP socket creates a new socket, for the server to communicate with that specific client

What type of socket does the below best describe: This is a connection-oriented socket

TCP sockets

When contacted by a client, what does the server do, under a TCP scheme?

The TCP server creates a new socket, for the server process to communicate with that specific client

How does a client contact a server, under a TCP scheme?

The client creates a TCP socket, specifying IP address and port number (i.e. the socket) of the server

When using UDP, what must the receiver extract from each packet?

The receiver must extract data, sender IP address, and port number from the received packet (but only the port number determines the socket it goes to!)

What are the requirements for the server, so that the client can contact the server to set up a TCP connection?

The server process must be running, and the server must have created a socket to welcome incoming client messages

What are the socket types?

There is one socket type for each transport layer service! i.e. there are UDP sockets and TCP sockets

When using UDP, what must the sender attach to each packet?

They must explicitly attach IP destination address and port number to each packet

What setup is required to communicate via UDP?

Trick question - none! No setup is required.

What type of socket does the below best describe: The receiver extracts IP destination address and port number from each packet

UDP sockets

What type of socket does the below best describe: This is a connectionless socket

UDP sockets


Conjuntos de estudio relacionados

Teaching and learning/patient education ML4 PrepU

View Set

[NURS 140] ATI FUNDAMENTALS (GRAY BOOK) - FINAL RELATED NCLEX QUESTIONS

View Set

Chapter 45: PrepU - Nursing Management: Patients With Neurologic Trauma

View Set

LearningCurve 15a. Introduction to Psychological Disorders

View Set

Fundamentals - Chapter 31: Physical Assessment

View Set

Summer School World History: Unit 1 Packet Chapters 1 and 3

View Set