/// <summary> /// Disconnected client. /// </summary> /// <param name="context">The server context.</param> private void Server_OnDisconnected(Sockets.IServerContext context) { HttpServerContext httpContext = null; bool ret = _serverList.TryRemove(context.ConnectionID, out httpContext); // If found then release. if (ret) { // Release all resources. if (httpContext != null) { httpContext.Dispose(); } httpContext = null; } }
/// <summary> /// Connected client. /// </summary> /// <param name="server">The server.</param> /// <param name="context">The server context.</param> private void Server_OnConnected(Sockets.IServer server, Sockets.IServerContext context) { }