25.10.2016, 06:18
Since you are calling receive() without any arguments it will try to receive all data before socket is closed which is probably not the behavior you want. Try specifying the number of bytes that the reply should contain and it should work.