I had a problem using winsock that was when I sent two "messages" in two consecutive code lines it arrived in the server in one same getdata.
I had to split the data into to strings.