checkpoint
This commit is contained in:
parent
364ed8f82f
commit
69b205ef4c
@ -40,18 +40,17 @@ int main(int argc, char const *argv[])
|
||||
while (1)
|
||||
{
|
||||
message_recieved = recv(sock, buffer, sizeof(buffer), 0);
|
||||
printf("%s\n", buffer);
|
||||
if (strcmp(buffer, "over") == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
int av_open = open("package.jpg", O_CREAT | O_RDWR);
|
||||
int av_open = open("package.jpg", O_CREAT | O_APPEND, 0644);
|
||||
int av_write = write(av_open, buffer, sizeof(buffer));
|
||||
lseek(av_open, sizeof(buffer), 0);
|
||||
int av_close = close(av_open);
|
||||
}
|
||||
printf("%s", "Received");
|
||||
// printf("%s", "Received");
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
BIN
package.jpg
Executable file → Normal file
BIN
package.jpg
Executable file → Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user