Sending Byte array via winsock??
Hi guys
Well I want to send a byte array via winsock but one problem…. I have the following in server app:
Winsock.SendData Bytearr
And the following in Dataarrival of the winscok in client:
Private Sub WinSock_DataArrival(ByVal bytesTotal As Long)
Dim b() As Byte
WinSock.GetData b
End Sub
Here is the problem: I want to send a 5000 byte thing so I have up to b(5000) right? Now I follow the process step by step in both server and client. I see while run time the server sends the whole bytearray at once but what about the client… here: I guess it creates a buffer and recives the array by part for example in 1000 byte packages. And every time for getting arriving bytes the DataArrival events wakes witch means loosing all other pervios bytes what should I do with it?
Thank u