public void Run() { ServerConnection.AcceptConnection(); try { Loop.RunLoop(); } finally { ServerConnection.Close(); } }
public override void Stop() { try { base.Stop(); } catch { ; } try { if (connection != null) { connection.Close(); connection = null; } } catch { ; } }
internal void RemoveConnection(IServerConnection connection) { connection.StopAsyncRecive(); connection.Close(); this.connections.Remove(connection.ID); }