Task: Implement Correct HTTP Client with Proper Socket Shutdown
Task: Implement Correct HTTP Client with Proper Socket Shutdown: a task in Terminal-Lego-15k (Harbor dataset). When implementing an HTTP client using TCP sockets in C, proper socket lifecycle management is critical. Specifically, the shutdown() system call with SHUT WR (shutdown writing) must be…
The task
When implementing an HTTP client using TCP sockets in C, proper socket lifecycle management is critical. Specifically, the `shutdown()` system call with `SHUT_WR` (shutdown writing) must be used at the correct point in the connection lifecycle. Calling `shutdown(fd, SHUT_WR)` sends a TCP FIN to the server, signaling…
Part of PrimeIntellect/Terminal-Lego-15k.