Kelder is taking the time to try to explain to you the concept of sockets, providing a detailed explanation and code examples. There's no point to continue if you're not going to listen or read carefully what's been said. You don't seem to be doing this, because Kelder's code clearly got rid of the header part, whereas in your code it shows all the header information. The solution to your problem was already given, all you needed to do is _read_ it.