网络通讯中需要使用中文字符通讯。
if (client == null)
{
client = SocketFactory.CreateClient<TcpClient>(IP, Port);
client.TimeOut = 300000;
client.Encoding = Encoding.GetEncoding(936); //936表示GB2312
}

本文介绍了一种在网络通讯中设置中文字符传输的方法。通过创建TCP客户端,并设置超时时间和字符编码为GB2312(936),确保了中文字符在网络传输过程中的正确性。
528

被折叠的 条评论
为什么被折叠?



