public override void SessionReceive(IServer server, SessionReceiveEventArgs e)
        {
            base.SessionReceive(server, e);
            PipeStream pipeStream = e.Session.Stream.ToPipeStream();
            HttpToken  token      = (HttpToken)e.Session.Tag;
            var        result     = pipeStream.IndexOf(_line.Data);

            while (result.End != null)
            {
                if (result.Length == 2)
                {
                    if (token.CurrentRequest != null)
                    {
                        token.Requests.Enqueue(token.CurrentRequest);
                        token.CurrentRequest = null;
                        token.ThreadDispatcher.Enqueue(token);
                    }
                    pipeStream.ReadFree(result.Length);
                }
                else
                {
                    if (token.CurrentRequest == null)
                    {
                        var request = new RequestData();

                        byte[] buffer = null;
                        if (Program.Debug)
                        {
                            buffer = new byte[result.Length];
                        }
                        else
                        {
                            buffer = System.Buffers.ArrayPool <byte> .Shared.Rent(result.Length);
                        }
                        pipeStream.Read(buffer, 0, result.Length);
                        request.Data = new ArraySegment <byte>(buffer, 0, result.Length);
                        AnalysisAction(request);
                        if (request.Action == ActionType.Plaintext)
                        {
                            token.CurrentRequest = request;
                        }
                        else
                        {
                            pipeStream.ReadFree((int)pipeStream.Length);
                            OnStartRequest(request, e.Session, token, pipeStream);
                            return;
                        }
                    }
                    else
                    {
                        pipeStream.ReadFree(result.Length);
                    }
                }
                if (pipeStream.Length > 0)
                {
                    result = pipeStream.IndexOf(_line.Data);
                }
                else
                {
                    break;
                }
            }
        }
        private void AnalysisAction(RequestData requestData)
        {
            var line                   = _line.AsSpan();
            int len                    = requestData.Data.Count;
            var receiveData            = requestData.GetSpan();
            ReadOnlySpan <byte> http   = line;
            ReadOnlySpan <byte> method = line;
            ReadOnlySpan <byte> url    = line;
            int offset2                = 0;
            int count                  = 0;

            for (int i = 0; i < len; i++)
            {
                if (receiveData[i] == line[0])
                {
                    http = receiveData.Slice(offset2, i - offset2);
                    break;
                }
                else
                {
                    if (receiveData[i] == _Space)
                    {
                        if (count != 0)
                        {
                            url     = receiveData.Slice(offset2, i - offset2);
                            offset2 = i + 1;
                        }
                        else
                        {
                            method  = receiveData.Slice(offset2, i - offset2);
                            offset2 = i + 1;
                            count++;
                        }
                    }
                }
            }
            int queryIndex = AnalysisUrl(url);
            ReadOnlySpan <byte> baseUrl     = default;
            ReadOnlySpan <byte> queryString = default;

            if (queryIndex > 0)
            {
                baseUrl                 = url.Slice(0, queryIndex);
                queryString             = url.Slice(queryIndex + 1, url.Length - queryIndex - 1);
                requestData.QueryString = Encoding.ASCII.GetString(queryString);
            }
            else
            {
                baseUrl = url;
            }
            if (baseUrl.Length == _path_Plaintext.Length && baseUrl.StartsWith(_path_Plaintext))
            {
                requestData.Action = ActionType.Plaintext;
            }
            else if (baseUrl.Length == _path_Json.Length && baseUrl.StartsWith(_path_Json))
            {
                requestData.Action = ActionType.Json;
            }
            else if (baseUrl.Length == _path_Db.Length && baseUrl.StartsWith(_path_Db))
            {
                requestData.Action = ActionType.Db;
            }
            else if (baseUrl.Length == _path_Queries.Length && baseUrl.StartsWith(_path_Queries))
            {
                requestData.Action = ActionType.Queries;
            }

            else if (baseUrl.Length == _cached_worlds.Length && baseUrl.StartsWith(_cached_worlds))
            {
                requestData.Action = ActionType.Caching;
            }

            else if (baseUrl.Length == _path_Updates.Length && baseUrl.StartsWith(_path_Updates))
            {
                requestData.Action = ActionType.Updates;
            }
            else if (baseUrl.Length == _path_Fortunes.Length && baseUrl.StartsWith(_path_Fortunes))
            {
                requestData.Action = ActionType.Fortunes;
            }
            else
            {
                requestData.Action = ActionType.Other;
            }
        }