I currently have a winsock control on a form listen for connection, once a connection has been established it starts to receive data from another application sending the data.
My problem is I send a large amount of data split up into chunks through to the listening winsock control, one after the other.
At the listening winsock control I sometimes get duplicate chunks of data and so receive more data than was actually sent.

I have checked this by writing the output to a file..please see below.

VB Code:
  1. pstrData = ""
  2.    sckTransactionServer(Index).GetData pstrData, vbString
  3.  
  4.   Open "D:\development\WebeXchange2\AuthXLoadBalancer\tcpipinput.txt" For Append As #2
  5.       Print #2, pstrData
  6.    Close #2

It looks as though the GetData buffer is not being emptied on the GetData call before the next DataArrival event is fired??

Help???