private void button1_Click(object sender, EventArgs e) { sock = new SocketSDK(); sock.PingCheck = true; sock.SetIPAddress("127.0.0.1", 5000); sock.Open(); // sock.ASyncStopWrite(); }
void msgxx() { try { SocketSDK sock = new SocketSDK(); sock.ReceiveBufferSize = 1024; sock.SendBufferSize = 1024; sock.ReceiveTimeout = 1000; sock.SendTimeout = 1000; sock.SetIPAddress("", 5000); sock.KeepAlive = true; sock.MaxConnect = 150; sock.Bind(); if (sock.IsBound) { while (true) { try { testcall call = new testcall(); call.sock = sock.Accept(); System.Threading.Thread th1 = new System.Threading.Thread(call.main); th1.Start(); } catch (Exception exx) { } } } else { } sock.Close(); } catch (Exception ex) { } }