Are you awared that you can receive your data on more than
one "dataHandler" event ?
If you send 2000 bytes you can receive 100 bytes on the first
call to SOCKET_DATA event and then 1900 bytes in a second call.
We can't see if you take care of this in your code