refactoring of tcp

This commit is contained in:
cozis
2023-08-31 13:29:56 +02:00
parent 3489f62140
commit 5f3f7dc66d
12 changed files with 510 additions and 254 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ int main(void)
return -1;
}
uint16_t port = 80;
uint16_t port = 8081;
microtcp_socket_t *server = microtcp_open(mtcp, port, &errcode);
if (errcode) {
fprintf(stderr, "Error: %s\n", microtcp_strerror(errcode));
+2
View File
@@ -1283,6 +1283,8 @@ static void when_data_is_ready_to_be_read(context_t *ctx, conn_t *conn)
downloaded = b->used - before;
}
fprintf(stderr, "XHTTP :: Downloaded %d bytes\n", downloaded);
int served_during_this_while_loop = 0;
while(1)