vs:
string sendStr = "send to client :hello";
byte[] sendByte = Encoding.ASCII.GetBytes(sendStr);
serverSocket.Send(sendByte, sendByte.Length, 0);
serverSocket.Close();
sSocket.Close();
Console.ReadLine();
unity:
if (GUI.Button(new Rect(0, 150, 100, 50), "收消息"))
{
byte[] bt = new byte[1024];
}
结果一点收消息按钮unity就卡掉了。
发消息和连接都没有问题,好郁闷啊
string sendStr = "send to client :hello";
byte[] sendByte = Encoding.ASCII.GetBytes(sendStr);
serverSocket.Send(sendByte, sendByte.Length, 0);
serverSocket.Close();
sSocket.Close();
Console.ReadLine();
unity:
if (GUI.Button(new Rect(0, 150, 100, 50), "收消息"))
{
byte[] bt = new byte[1024];
}
结果一点收消息按钮unity就卡掉了。
发消息和连接都没有问题,好郁闷啊
