Shouldn't you handle fragmentation? I don't think TCP guarantees that csock.recv() will give you all of the message.
UDP is unreliable and has small packet size. The TCP code is emulating that simple requirement. Why expand the requirement? Looping to read fully would block on one connection. One rogue client would hold up the whole server.
You are only guaranteed to get the bytes in the correct order but you have to find the boundaries between messages yourself.