public void InitServer() { receiveSock.Close(); System.Threading.Thread.Sleep(100); receiveSock.ConnectionInfoString = String.Format("MODE=TCP_PASSIVE, PORT={0}", receivePort); receiveSock.Open(); SendSock.Close(); System.Threading.Thread.Sleep(100); SendSock.ConnectionInfoString = String.Format("MODE=TCP_PASSIVE, PORT={0}", sendPort); SendSock.Open(); }
public void Close() { _sock.Close(); heartbeatCounter = 0; }