//------------------------------------------------------------------------------------------------------------------------ #if NETFX void PortListenerEntryPoint() { try { //start listening sock?.Listen(50); //heartbeat while (_IsRunning) { //we need to stop? if (sock == null) { break; } try { //accept new connection var newsocket = sock.Accept(); //handlew new connection if (newsocket != null) { HandleNewConnection(newsocket); } } catch (Exception ex) { DebugEx.TraceErrorException(ex); } } } catch (Exception ex) { DebugEx.Assert(ex, "YPChannel server heartbeat error"); } //inform for heartbeat end DebugEx.TraceLog("YPChannel server heartbeat finished"); }