Writing to tcp sockets is hard, mmmmkay