- Mar 31, 2003
- 11,679
- 0
- 81
I'm trying to code a Transport layer on top of my unreliable transfer client/server pair so I can implement congestion control and reliable data transfer for my networking class (*Thus no actual code please*).
I know I can code it with relative ease, but what I am having trouble with is how to structure this code.
This is my psuedo code
Am I on the right course here? I don't understand how I send multiple packets in my receive window though? Do I simply instantiate 4 timertask objects? I question it because I feel like the RWIN should be adjustable...
Thanks,
-Kevin
I know I can code it with relative ease, but what I am having trouble with is how to structure this code.
This is my psuedo code
Code:
Main Class
Instantiate new application layer FTP class
FTP Class
Constructor
Copy host, port, filename to variables global to the FTP class
application method
Open file, connect to socket, open various file streams
call transport layer
close all streams and sockets
transport layer method
instantiate UDP class
loop infinitely
implement cases for congestion control and reliable transfer
implement case for calling the UDP transfer
UDP class extends TimerTask
constructor
copy local variables for I/O streams
run
transfer packet in byte stream with header
Am I on the right course here? I don't understand how I send multiple packets in my receive window though? Do I simply instantiate 4 timertask objects? I question it because I feel like the RWIN should be adjustable...
Thanks,
-Kevin