public void ChatRecvThread() { byte[] recvData = new byte[CONSTANTNUMBER.DEFAULT_MESSAGA]; string str; while (true) { clientChatSock.Receive(recvData); str = ByteAndString.ByteToString(recvData); Console.WriteLine(str); } }
public void ChatSendThread() { byte[] sendData = new byte[CONSTANTNUMBER.DEFAULT_MESSAGA]; String str; while (true) { str = Console.ReadLine(); //Console.WriteLine(str); // sendData = ByteAndString.StringToByte(str); //Console.WriteLine(sendData.Length); // clientChatSock.Send(sendData); } }