Interface to Simulator


Debug

Timer

The timer provides the following functionality: When a client extends the TimerClient class, it is provided the following functionality:

Network

The Network class provides the ability to send packets on the network. It provides the following method for sending packets:

public void TransmitPacket (NetworkPacket p);
Submit a packet to the network, for delivery to the client whose address is in the destinationAddr field of the packet. Blocks for whatever transmission time the network imposes.

In order to receive a packet, the client has to implement the interface PacketReceiver. This entails that the client has to define the following method.

public void PacketArrived (NetworkPacket p);
When a packet arrives from the network for the client, the above method is called. The client can do the processing of the packet in the PacketArrived method.

Reliability

The reliability package defines the interfaces ReliableSender and ReliableReceiver. Your implementations of the sliding window protocol should implement these interfaces.

Application

The application package provides an implementation of two application = one of which continuously sends data and the other receives data. You can use these applications without changing them.

project1

The project1 package sets up the network with the appropriate parameters.
The major part of the project would involve changing the provided stop-and-wait protocol implementation to the sliding window protocol application. For this you would mainly have to modify the files SAWSender.java and SAWReceiver.java.