20.01.2013 Views

Transport Layer - Freie Universität Berlin

Transport Layer - Freie Universität Berlin

Transport Layer - Freie Universität Berlin

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Socket programming in TCP<br />

Server (on host hostid) Client<br />

create socket,<br />

port=x, for incoming request:<br />

welcomeSocket = ServerSocket ()<br />

wait for incoming<br />

connection request<br />

connectionSocket =<br />

welcomeSocket.accept ()<br />

read request from<br />

connectionSocket<br />

write reply to<br />

connectionSocket<br />

close<br />

connectionSocket<br />

TCP<br />

Connection establishment<br />

create socket,<br />

connect to hostid, port=x<br />

clientSocket = Socket ()<br />

send request using<br />

clientSocket<br />

read reply from<br />

clientSocket<br />

close<br />

clientSocket<br />

Univ.-Prof. Dr.-Ing. Jochen H. Schiller ▪ cst.mi.fu-berlin.de ▪ Telematics ▪ Chapter 8: <strong>Transport</strong> <strong>Layer</strong><br />

8.43

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!