20-07-2013, 01:04 PM
Socket Programming - UDP
Socket Programming.pdf (Size: 189.06 KB / Downloads: 22)
Objectives:
Learn socket programming in Java: UDP
Cement your understanding of reliable transfer protocols
Overview
First, download the framework for this project from blackboard
(compnet_P2_StopAndWait.zip). This framework provides:
a template for the reliable transfer protocol implementation,
a testing framework, with a graphical user interface.
We describe how to use the testing framework later in the project description. For now, we
recommend that you ignore it, and focus only on the package
us.wsu.compnet.reliabletransfer.
The Stop-and-Wait Protocol
In this project we are going to implement a Stop-and-Wait reliable protocol, almost identical to
the rdt3.0 protocols from the book and lecture slides. Below, we present a slightly modified
version of the protocol.
Testing.
Running the protocol. The provided framework contains the package us.wsu.compnet.start.
This package consists of two classes with self-explanatory names: StartReceiver and
StartSender. For the sake of time, we recommend you do not look at the code of the framework
for the duration of the project - but feel free to examine it later if you are interested in how it
works.
Run the StartReceiver class as a Java application to start the receiver. You will be first asked
for the port on which the receiver should await a connection. Then you will be shown the main
receiver window, with a status box at the bottom, and a content box on the top, showing the
received content as it arrives.