TCP Requests should be sent in chunks

TCP is a stream oriented protocol and multiple calls to recv may be needed to receive a full HTTP request. There should probably be a step in the course where requests starts getting sent in chunks so the server implementations have to handle that.

To ensure this in the test code, disabling the Nagle algorithm for the TCP connection and making multiple calls to send with a small delay between calls should ensure data is sent in segments.

This should probably apply to all courses which uses tcp for communication.

It’s a basic thing that all servers of any kind that uses tcp has to handle, so the tests should be designed to force tcp messages to be fragmented.

Yeah, this is a valid point. Our thinking was that we’d make this an extension.

@fre-ros do you think it makes more sense to test for this from the start? Or would you prefer if this was an extension?

I guess ideally it would be from the start as it will affect the designed solutions fundamentally, one has to create a state machine for parsing/decoding instead of taking for granted that all necessary data has been received.

But if you change it from the start I guess that will break the solution for many people so an extension is probably better?