[ADDITION] added a wait one to the client onread
This commit is contained in:
@@ -76,6 +76,7 @@ namespace Client
|
|||||||
expectedMessageLength = BitConverter.ToInt32(totalBuffer, 0);
|
expectedMessageLength = BitConverter.ToInt32(totalBuffer, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ar.AsyncWaitHandle.WaitOne();
|
||||||
stream.BeginRead(buffer, 0, buffer.Length, new AsyncCallback(OnReadComplete), null);
|
stream.BeginRead(buffer, 0, buffer.Length, new AsyncCallback(OnReadComplete), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user