checkpoint

This commit is contained in:
Michal Starski 2018-11-26 23:27:19 +01:00
parent 364ed8f82f
commit 69b205ef4c
3 changed files with 3 additions and 4 deletions

BIN
avClient

Binary file not shown.

View File

@ -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

Binary file not shown.