2-06-2007-Part1 - Implementation of Stop and Wait Stop and...

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

View Full Document Right Arrow Icon
Implementation of Implementation of Stop and Wait Stop and Wait Stop and Wait with Timeout Stop and Wait with Timeout Hua Zhang Hua Zhang 02/06/2007 02/06/2007 Cis4363: Network Security and Privacy Cis4363: Network Security and Privacy
Background image of page 1

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

View Full DocumentRight Arrow Icon
Stop And Wait Stop And Wait Client Server Question ACK Answer ACK
Background image of page 2
Implementation - Connection Implementation - Connection //connect to server socket.connect(( new InetSocketAddress( "127.0.0.1" , 2007))); //get output and input stream oos = new ObjectOutputStream(socket.getOutputStream()); ois = new ObjectInputStream(socket.getInputStream()); //create socket ssocket = new ServerSocket(); //bind to a port ssocket.bind( new InetSocketAddress(2007)); //accept connection from client socket = ssocket.accept(); //get output and input stream oos = new ObjectOutputStream(socket.getOutputStream()); ois = new ObjectInputStream(socket.getInputStream());
Background image of page 3

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

View Full DocumentRight Arrow Icon
Implementation – Main Implementation – Main //begin main loop iOption = getUserInput(); while (iOption != 4) { //sent the question to server
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/04/2011 for the course CIS 4643 taught by Professor Staff during the Spring '07 term at University of Central Florida.

Page1 / 11

2-06-2007-Part1 - Implementation of Stop and Wait Stop and...

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

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