Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
12Activity
0 of .
Results for:
No results containing your search query
P. 1
Socket programming

Socket programming

Ratings: (0)|Views: 182 |Likes:
Published by api-19740657

More info:

Published by: api-19740657 on Dec 01, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PPT, PDF, TXT or read online from Scribd
See more
See less

03/18/2014

pdf

text

original

Socket programming
Socket API
\u2022introduced in BSD4.1 UNIX, 1981
\u2022explicitly created, used, released by
apps
\u2022client/server paradigm
\u2022two types of transport service via
socket API:
\u2013unreliable datagram
\u2013reliable, byte stream-oriented
ahost-local,appli cati on-
created/owned,
OS-controlledinterface
(a \u201cdoor\u201d) into which
application process can
both send and
receivemessages to/from
another (remote or
local) application process
socket
Goal: learn how to build client/server application that
communicate using sockets
Socket-programming using TCP
Socket: a door between application process and end-end-
transport protocol (UDP or TCP)
TCP service: reliable transfer ofbytes from one process to
another
process

TCP with
buffers,
variables

socket

controlled by
application
developer

controlled by
operating
system

host or
server
process

TCP with
buffers,
variables

socket

controlled by
application
developer

controlled by
operating
system

host or
server
internet
Socket programming with TCP
Client must contact server
\u2022server process must first
be running

\u2022server must have created
socket (door) that
welcomes client\u2019s contact

Client contacts server by:
\u2022creating client-local TCP
socket
\u2022specifying IP address, port
number of server process

\u2022When client creates socket:
client TCP establishes
connection to server TCP

\u2022When contacted by client,
server TCP creates new
socket for server process to
communicate with client
\u2013allows server to talk with
multiple clients

TCP provides reliable, in-order
transfer of bytes (\u201cpipe\u201d)
between client and server

application viewpoint

Activity (12)

You've already reviewed this. Edit your review.
1 hundred reads
scorpionkish7729 liked this
Didin Jo liked this
cpatil319311 liked this
cpatil319311 liked this
GAURAV liked this
javen14phus liked this
cpranav01 liked this
arunmanikumar liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->