uploading a file from client to server (C only) using PDU

Thread Starter


Joined Oct 31, 2008
Could you please explain to me how to write a C program that can transfer a file from client side to server side using PDU protocol. And a timer to detect the file data retransmission condition. Specifically, a timer is started when a data PDU and a final PDU is sent. If no acknowledgement is received before the timer expires, the PDU will be retransmitted. The client also starts a timer when it sends a filename PDU. If it does not receive the server-ready PDU before the timer expires, it will retransmit the filename PDU. The server uses a timer to detect the lack of activity in the connection between the client and itself. Extensive period of inactiveness (says 10 seconds) usually means that an unrecoverable error event has occurred and the server should go back to the idle state. In addition, after sending the ACK for the final PDU, the server should enter the FINAL state and starts a timer for the duration of 10 seconds. The purpose of this is to make sure that the client will receive the ACK of the final PDU.

Thank you a lot and have a nice day!