Hello, I am experiencing a problem with ICS where the Receive buffer is an
array of char,
When I receive the data it is not what I expected, maybe my data sent is
wrong or the receiver end.

The code worked perfect with Delphi 7 but with Delphi 2009 it is failing;

In my Code I have replaced all occurrences of String with AnsiString, but
this has not solved my problem.

  Buffer : array [0..1023] of char; //reception buffer of 1024 characters

  Len    := WSocket.ReceiveFrom(@Buffer, SizeOf(Buffer), Src, SrcLen);
  Memo1.Lines.Add(' Data Received from'+StrPas(inet_ntoa(Src.sin_addr))+
':'+ IntToStr(ntohs(Src.sin_port))+'>>'+StrPas(Buffer));

The Buffer Contains this: Data Received from x.y.z:6109>>汣敩瑮举䵁E

I am expecting ASCII text yet I get the Chinese

Any help please.
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to