I need help getting my project started. I want to finish it on my own but im not sure how to start it. I would appreciate some tips on what i need to complete it and make it work. I do not want you to complete the project as that is cheating and i wont learn that way. Thank You The Server Must accept commands in the form: PUSH “filename” fileSize <<>> PUSH means that the client will be sending you a file. You need to store it with the filename sent. You must expect and require fileSize bytes. Respond to the client with “OK”. PULL “filename” PULL means that the client wants this file back. Respond with the number of bytes (use stat()), and then send all of the bytes to the client. Then respond with “OK” (a different send()). The server should take two parameters – the directory to work in and the port. The server should not shutdown. The server must have an accept() loop to allow multiple clients to connect (one at a time).
I need help getting my project started. I want to finish it on my own but im not sure how to start it. I would appreciate some tips on what i need to complete it and make it work. I do not want you to complete the project as that is cheating and i wont learn that way. Thank You
The Server
Must accept commands in the form:
PUSH “filename” fileSize <<<bytes>>>
PUSH means that the client will be sending you a file. You need to store it with the filename sent. You must expect and require fileSize bytes. Respond to the client with “OK”.
PULL “filename”
PULL means that the client wants this file back. Respond with the number of bytes (use stat()), and then send all of the bytes to the client. Then respond with “OK” (a different send()).
The server should take two parameters – the directory to work in and the port. The server should not shutdown. The server must have an accept() loop to allow multiple clients to connect (one at a time).
Trending now
This is a popular solution!
Step by step
Solved in 4 steps