End Google Ads 201810 - BS.net 01 -->
Hi I am trying to figure out why my method keeps only showing me the first character from a sent string. I would like it to show all the characters that were sent.
public void OnDataReceived(IAsyncResult asyn)
{
try {
SocketPacket socketData = (SocketPacket)asyn.AsyncState;
int iRx = 0;
iRx = socketData.currentSoc.EndReceive(asyn);
char[] chars = new char[iRx];
System.Text.Decoder d = System.Text.Encoding.UTF8.GetDecoder();
int charLen = d.GetChars(socketData.dataBuffer, 0, iRx, chars, 0);
System.String szData = new System.String(chars);
MessageBox.Show(szData);
مواقع النشر (المفضلة)