I have a Real Time Client/server application which should process received data and send back result with in milliseconds.Application is working fine when it runs in normal load.
During my testing phase i tested by sending 100 message to clients in One seconds, But Client Application will only process
40 message , But sever will send all 100 message to clients. I would like to know Is there any
DATA LOSS occurring in Client Side. Here is the code i wrote to receive data from sever.
Private Sub sockDataArrival(ByVal ar As IAsyncResult)
Dim state As StateObject = CType(ar.AsyncState, StateObject)
Dim client As Socket = state.workSocket
Dim bytesRead As Integer
bytesRead = client.EndReceive(ar)
Dim Data() As Byte = state.buffer
If bytesRead = 0 Then
client.BeginReceive(state.buffer, 0, state.BufferSize, 0, AddressOf sockDataArrival, state)
RaiseEvent onDataArrival(Data, bytesRead)
Any Idea about this.....?
Dheeraj PK http://dheerajpk.spaces.live.com/default.aspx
View Complete Post