The Server is sending 20 characters at a time...but the client is only receiving a few characters (one or two characters) at a time.
How can I make the client receive the entire string being sent from the server all at once?
public void OnDataReceived(IAsyncResult asyn)
SocketPacket theSockId = (SocketPacket)asyn.AsyncState ;
int iRx = theSockId.thisSocket.EndReceive (asyn);
//char chars = new char[iRx + 1];
char chars = new char;
System.Text.Decoder d = System.Text.Encoding.UTF8.GetDecoder();
int charLen = d.GetChars(theSockId.dataBuffer, 0, iRx, chars, 0);
System.String szData = new System.String(chars);
catch (ObjectDisposedException )
System.Diagnostics.Debugger.Log(0,"1","\nOnDataReceived: Socket has been closed\n");
MessageBox.Show (se.Message );