Herkese selamlar, Bir ödevimde sizden yardım istiyorum. Hocamız bizden HTTP+ impelemti ile bir adet dosya indirme programı istemekte.
Aşağıda da ingilizce ödevin açıklaması bulunmakta; You will implement both a client and a server for a hypothetical protocol called http+. Server must be multithreaded or multiprocess. It is very similar to HTTP itself but it can download multiple files with one request. A standard protocol session looks like that: Client -> Server MGET 3 file1.txt file2.txt homework.pdf HTTP+/1.0 Server -> Client HTTP+/1.0 200 OK FILEOK: file1.txt 1000 FILEOK: file2.txt 2500 FILEOK: homework.pdf 1244 DATA .. Each FILEOK header is followed by the filename requested and the size of the file. DATA will consist how contents of file1.txt file2.txt homeworkd.pdf in the given order. In the DATA part, you can decide where a file begins and ends looking at the size of that file. For the above example, first 1000 bytes of DATA will be file1.txt, next 2500 bytes will be file2.txt next 1244 bytes will be homework.pdf. Response states: 200 OK : It means there is no problem and all files are available 202 Partial Data : Some or all files are missing 205 Bad Request : Syntax error in the request 400 Sever Crash : A serious problem occurred. Response structure depending on the response states: 200 : Similar to the above example 202 : HTTP+/1.0 202 Partial Data FILEOK : file1.txt 1000 FILEPROBLEM : file2.txt 0 FILEOK : test.txt 1244 DATA ... /////////////DATA will consist of only file1.txt and test.txt 205 and 400 : There will not be any more HEADERS or DATA
Yardımlarınız için şimdiden teşekkürler...
yeni mesaja git
Yeni mesajları sizin için sürekli kontrol ediyoruz, bir mesaj yazılırsa otomatik yükleyeceğiz.Bir Daha Gösterme