寫file-d同file-client

睇左Prestige,雖然唔係明晒,但係都覺得好睇…真係幾好睇…

G之前叫我幫佢寫個file sharing server client
其實之前佢都問過我,我都睇過份spec,唔係太難,所以今日開始寫

叫佢send番份spec黎,睇多次,發覺仲衰過我441份spec…只係寫左

  1. If a user Y can access the file names and file lengths correctly, you can get 20 marks.
  2. If a user Y can download the selected files correctly, you can get 40 marks.
  3. If you don’t implement the password function, 10 marks will be deducted.

問題係,extra credit

  1. Support directory operations, i.e., browsing a directory and downloading the whole directory.

點可以唔browse又get到個filename同filesize?9唔搭8,都唔知佢想點…
好明顯protocol都係任我定啦!

由頭寫,寫左三個鐘左右,個server已經可以telnet入去玩…其實都只係可以ls, get, quit…同埋係thread-safe
再寫client,其實都只係得個煩字,只係send/read…

6點先訓…


Posted

in

, ,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *