TryGetServiceHostInternally() private method

private TryGetServiceHostInternally ( string servicePath, WebSocketSharp.Server.WebSocketServiceHost &serviceHost ) : bool
servicePath string
serviceHost WebSocketSharp.Server.WebSocketServiceHost
return bool
        private void acceptWebSocketRequest(HttpListenerWebSocketContext context)
        {
            var path = context.Path;

            WebSocketServiceHost host;

            if (path == null ||
                !_serviceHosts.TryGetServiceHostInternally(path, out host))
            {
                context.Close(HttpStatusCode.NotImplemented);
                return;
            }

            host.StartSession(context);
        }
        private bool processWebSocketRequest(HttpListenerContext context)
        {
            var wsContext = context.AcceptWebSocket();

            var path = wsContext.Path;
            WebSocketServiceHost host;

            if (path == null || !_serviceHosts.TryGetServiceHostInternally(path, out host))
            {
                context.Response.StatusCode = (int)HttpStatusCode.NotImplemented;
                return(false);
            }

            wsContext.WebSocket.Log = _logger;
            host.StartSession(wsContext);

            return(true);
        }
        private void acceptWebSocket(TcpListenerWebSocketContext context)
        {
            var path = context.Path;

            WebSocketServiceHost host;

            if (path == null ||
                !_serviceHosts.TryGetServiceHostInternally(path, out host))
            {
                context.Close(HttpStatusCode.NotImplemented);
                return;
            }

            if (_uri.IsAbsoluteUri)
            {
                context.WebSocket.Url = new Uri(_uri, path);
            }

            host.StartSession(context);
        }