public async ValueTask <ConnectionContext> AcceptAsync(CancellationToken cancellationToken = default)
        {
            ValueTask <TSocket> acceptTask;

            lock (_gate)
            {
                if (_state > TransportThreadState.ClosingAccept)
                {
                    return(null);
                }
                else if (_state < TransportThreadState.Started)
                {
                    ThrowInvalidState();
                }

                acceptTask = _threadContext.AcceptAsync(cancellationToken);
            }

            return(await acceptTask);
        }