I want to write (TCP) Server Client program. Client code should be in Objetive-C. Server side code should be in C#.
我已经写入了一些代码。 它正在起作用。 但问题是: 我将信息从客户端发送到服务器。 服务器正在接收信息。 但收到的信息看起来就像“ 加密” 的数据 。
code:
Objective-C
const uint8_t *rawdata = (const uint8_t*)[@"Welcome..." UTF8String];
[outputStream write:rawdata maxLength:strlen((const char *)rawdata)];
C#
char[] chara = new char[data.Length / sizeof(char)];
System.Buffer.BlockCopy(data, 0, chara, 0, chara.Length);
String content = new String(chara);
Console.WriteLine("Received data : " + content);
请帮我解决这个问题