Socket接了一次数据后,不能再接了,怎么回事?50分再次求解!
服务端:
private void Form1_Load(object sender, EventArgs e)
{
thread = new Thread(new ThreadStart(get));
thread.Start();
}
private void get()
{
socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
IPEndPoint ipe = new IPEndPoint(IPAddress.Parse(getip()), 10);
socket.Bind(ipe);
isStart = true;
byte[] buff = new byte[1024];
while (isStart)
{
socket.Listen(10);
Socket conSocket = socket.Accept();