EE450-U4-SocketProgramming-Nazarian-Spring10

EE450-U4-SocketProgramming-Nazarian-Spring10 - University...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
University of Southern California Viterbi School of Engineering EE450 omputer Networks Computer Networks ocket Programming Socket Programming Shahin Nazarian Spring 2010
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Network Applications Development To develop a network application, you should write programs (e.g., in C++ or Java) that run on different end ystems and communicate with each other over the network systems and communicate with each other over the network In a client-server architecture : two distinct programs, one that run’s on user’s host (client) and another on he server’s host the server s host In a peer-to-peer ( p2p ) architecture : one program in each host, but those programs may be similar or even identical You won’t need to write programs that run on network core evices such as routers or layer 2 switches We know that devices such as routers or layer 2 switches. We know that they do not have (and do not need) an application layer In the jargon of operating systems, it is not the programs Shahin Nazarian/EE450/Spring 2010 but processes that communicate with each other. A process is a program that is running within an end system 2
Background image of page 2
Process Communication Process : Program running within a host Within same host, two processes communicate using inter-process communication (defined by the OS) Processes in different hosts communicate by xchanging essages cross the computer network exchanging messages across the computer network A network application typically consists of pairs of processes that send messages to each other over a network Example: Web application: A web client browser process (in the user’s host) exchanges messages with web erver rocess a web server process Note that any message sent from one process to another must go through the underlying network Shahin Nazarian/EE450/Spring 2010 3
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Process Communication in P2P In a P2P file-sharing system, a file is transferred from a process in one peer to a process in another peer For each pair of communicating processes we typically label one of the two processes as the client and the other process as the server Therefore here a process can be both a client and a erver Nevertheless in the context of any given server. Nevertheless in the context of any given communication session btn a pair of processes, we can still label one process as the client and the other process as the server Client process: Initiates communication Shahin Nazarian/EE450/Spring 2010 Server process: Waits to be contacted 4
Background image of page 4
Socket A process sends messages into, and receives messages from, the network through a software interface called a socket or the network API ( Application Programming Interface ) Process is analogous to a house, lient or ient r Socket is an interface (an abstraction, not real connection) through which applications communicate among each other g, socket to its door, & application to the person living in the house, Transport layer to the vehicle Client or server client or server controlled by person selects to travel from a
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/27/2010 for the course EE 450 taught by Professor Zahid during the Spring '06 term at USC.

Page1 / 29

EE450-U4-SocketProgramming-Nazarian-Spring10 - University...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online