-
Notifications
You must be signed in to change notification settings - Fork 0
si-blinta/tftp
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
# TFTP MULTITHREADED VERSION
### Multi threaded TFTP Server program
### Simple TFTP Client program
### A Server Directory : server_directory containing :
-ai.png
Every file is requested/sent from/to server_directory !
## Compilation
./build.sh
it will compile and also creates directories for clients to simulate a multiusers scenario.
## Launching
you will need to be in tftp_server folder :
./server [port] [packet loss percentage] ( we suggest to put packet loss at 10 )
you will need to be in client-x folder : ( x number of the client )
./client-x [server ip] [server port] [packet loss percentage] ( we suggest to put packet loss at 10 )
## HOW
Our multithreaded server is using a pool of threads, if a user wants to write / read
and all threads are busy , he will receive a NOT DEFINED ERROR saying that no thread is available.
We respected the Writers / Readers problem.
## Debugging
In the server program : We print each packet received / sent by which thread and also which file is open , for which operation.
In the client program : We still use the tracing : dont forget to activate it by typing "trace".
In build.sh : We create POOL_SIZE +1 directories (clients) so you can test if number_clients > POOL_SIZE.
Feel free to modify POOL_SIZE in server.h
## Note
In client side :
Even if the file doesn't exist in the server directory and we do a get request we create it. ( we dont delete the file on failure )
In server side :
Even if it the server thread time outs , it prints RRQ/WRQ FAILED time out reached ... , it means that the thread didnt receive the last ack.
Which can happen if the last ack is lost but the client received the whole file.
To check if it actually failed , check the block size < 516.
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published