Highlights
Aim
To design and develop a file transfer program utilising UDP socket-based communications between two networked PCs. The program should implement the RDT Stop and Wait (Idle RQ) protocol for flow control and a time out/ repeat sending, for lost or delayed transmissions to allow a file to be transferred from a client to a server.
Basic Requirements
1. The text file transfer program written in Stage 1 is to be extended to include an
RDT Stop and Wait error scheme. To implement the RDT Stop and Wait protocol, the file must be transmitted in frames of data with the necessary fields for frame de-limiters, frame number and a frame check sequence. The appropriate control characters according to ASCII should be used for error control and messaging (ACK & NAK), frame delimiters (STX, ETX) and link management functions (EOT).
2. The program will build on the program developed in Stage 1. The client computer will ask the server to send a copy of a file to the client. The name of the file is to be sent to the server and the server asked if it has a copy. If it has, then the transfer starts, if not the server responds that it does not have the file and asked for another file name or to terminate the connection. The file is sent by the server in packets using RDT Stop and Wait protocol. The file is to be of only ASCII characters (no binary files). The version of Comms.java will delete the transmission of strings for 0% of strings sent at present. This rate of lost is to be altered to 20% once a timeout system has been implemented. That is if there is a delay in an ACK coming back, due to a lost packet (string), then the packet must be retransmitted. This retransmission must be shown on the server's screen. In RDT Stop and Wait if the server receives an ACK character, from the client it will transmit the next block. If it receives a NAK character from the server indicating the previous block has an error and another copy is needed. So if either a time out or an error in a block occurs then the block must be retransmitted. In part 1 you noted that the characters could be changed to #. To detect these errors then you will need to implement an error checking system. This should take the form of a total of the character's ASCII numbers sent in the block (mod 128). The major change here is that the file contents are transmitted a line of characters at a time in frames. The value of N, currently set for only the server, will need to be set for both the server and client in your program. There is 1 in N errors in characters sent. For test purposes this value can be set to about 400. You can experiment with this...
3. The server will send the first line of characters of the file in a frame. To assist the transfer there are functions called writeString() and readString(). You are required to use these functions in the transfer of these frames. The function writeString() has a built in failure rate of 20%. When client computer receives a complete frame, it should first display the received frame and then check the frame for errors by looking at the FCS (frame check sequence). The FCS should be calculated using 1’s compliment binary addition of each character in each frame. It is an 8-bit (1-byte) checksum.
4. If there are no errors then an acknowledgment character (ACK) will be returned to the server computer and the client computer will store the frame in the file that has just been created. Upon receipt of the ACK, the server computer will then transmit the next frame. ACKs are sent in frames.
5. Should an error be detected, i.e. the received FCS byte does not equal the expected FCS byte, the client computer would return a NAK to the server. If the server receives a NAK, it will re-transmit the frame.
6. As some frames will fail to be sent (20% will fail) then the sender will not receive an acknowledgement back for it. In this case a timeout function at the sender’s end should detect the late arrival of the ACK and resend the frame.
7. This process of sending, checking and storing frames should continue until the complete file has been transmitted and received without error. Upon receipt of the final acknowledgement, the client computer should transmit an EOT (eg. ETX) character to the client to terminate the connection.
8. The program should implement both the timeout and error functionality as required by the RDT Stop and Wait protocol. The timer should run it it’s own thread to ensure accurate timing.
9. Note that since the ACKs are being sent using writeString() they too can be lost. This may lead to duplicate copies of a frame being sent. Both ACKs and Frames will need to be numbered with a "0" or a "1" alternatively to detect the duplicate transmissions.
This IT Assignment has been solved by our IT Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.