Develop a TCP sequential server (listening to the port specified as the first parameter of the command line, as a decimal integer) that, after having established a TCP connection with a client, accepts file transfer requests from the client and sends the requested files back to the client, following the protocol specified below. The files available for being sent by the server are the ones accessible in the server file system from the working directory of the server. Develop a client that can connect to a TCP server (to the address and port number specified as first and second command-line parameters, respectively). After having established the connection, the client requests the transfer of the files whose names are specified on the command line as third and subsequent parameters, and stores them locally in its working directory. After having transferred and saved locally a file, the client must print a message to the standard output about the performed file transfer, including the file name, followed by the file size (in bytes, as a decimal number) and timestamp of last modification (as a decimal number). Any timeouts used by client and server to avoid infinite waiting should be set to 15 seconds.
The protocol for file transfer works as follows: to request a file the client sends to the server the three ASCII characters “GET” followed by the ASCII space character and the ASCII characters of the file name, terminated by the ASCII carriage return (CR) and line feed (LF):
G E T …filename… CR LF
(Note: the command includes a total of 6 ASCII characters, i.e. 6 bytes, plus the characters of the file name). The server responds by sending: + O K CR LF B1 B2 B3 B4 File contents……… T1 T2 T3 T4
Note that this message is composed of 5 characters followed by the number of bytes of the requested file (a 32-bit unsigned integer in network byte order - bytes B1 B2 B3 B4 in the figure), followed by the bytes of the requested file contents, and then by the timestamp of the last file modification (Unix time, i.e. number of seconds since the start of epoch, represented as a 32-bit unsigned integer in network byte order - bytes T1 T2 T3 T4 in the figure).
To obtain the timestamp of the last file modification of the file, refer to the syscalls stat or fstat.
The client can request more files using the same TCP connection, by sending several GET commands, one after the other. When it has finished sending commands on the connection, it starts the procedure for closing the connection. Under normal conditions, the connection should be closed gracefully, i.e. the last requested file should be transferred completely before the closing procedure terminates. In case of error (e.g. illegal command, non-existing file) the server always replies with: - E R R CR LF
(6 characters) and then it starts the procedure for gracefully closing the connection with the client.
This just the case of client and sequential server.
I have done simillar client/server applications in C. Can finish the task in 4-5 hours time. Can start working immediately.
Bu iş için 17 freelancer ortalamada $143 teklif veriyor
HI.. I am good and experienced in network programming using TCP/IP sockets API in C/C++ language and can implement the client/server file transfer program as per given protocols as a console application.
Hi I’m ready for this project I’m an expert in C/C++ I read your specifications and I’m sure I can do it perfectly Please give me an opportunity to work for you
I can implement the client-server according to your specification. My question is there are already so many protocols like http, ftp .... etc available. Why are you trying to reinvent the wheel?
Hello. I do have experience in this kind of project (TCP client-server), therefore, I can deliver it in a short amount of time. Looking forward to work with you.
Hi, I've profound experience about linux and network programming, and have good knowledge about os networking framework. I've great confidence to do this work perfectly. Waiting for your good news. Thanks!
I have already worked on this project offline. I can finish this task as per your requirement. Please try me once and try to get the best support from my end.
Hi, I am a protocol engineer and network programming is my daily work. I have read your specification. I can definitely deliver it in a short amount of time. Waiting for your good news! Thanks!