Skip to content

Commit 19f4eca

Browse files
committed
clean
1 parent 91a8b2f commit 19f4eca

File tree

3 files changed

+11
-18
lines changed

3 files changed

+11
-18
lines changed

.gitignore

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
hw2/web/files
2-
hw2/web/videos
3-
hw2/web/tmp
4-
hw2/files
5-
6-
server
7-
client
1+
.*
2+
!.gitignore
3+
4+
*.o
5+
*~
6+
web/files
7+
web/videos
8+
web/tmp
9+

hw2/.gitignore

Lines changed: 0 additions & 9 deletions
This file was deleted.

hw2/client.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,8 @@ int main(int argc, char *argv[]) {
221221
request = vector<char>(header.begin(), header.end());
222222
for (int i = 0; i < file.size(); i++) request.push_back(file[i]);
223223
send(sockfd, request.data(), request.size(), MSG_NOSIGNAL);
224-
recv(sockfd, buf, sizeof(buf), 0);
225-
break;
224+
int n_recv;
225+
while ((n_recv = recv(sockfd, buf, sizeof(buf), 0)) > 0) break;
226226

227227
case Putv:
228228
if (!Fs::fileExists(arg)) {

0 commit comments

Comments
 (0)