public override NetSendResult Enqueue(NetOutgoingMessage message)
        {
            int queueLen = QueuedSends.Count + 1;
            int left     = GetAllowedSends();

            if (queueLen > left ||
                (message.ByteLength > _connection.CurrentMTU &&
                 _connection._peerConfiguration.UnreliableSizeBehaviour == NetUnreliableSizeBehaviour.DropAboveMTU))
            {
                _connection.Peer.Recycle(message);
                return(NetSendResult.Dropped);
            }

            if (message.BitLength >= ushort.MaxValue &&
                _connection._peerConfiguration.UnreliableSizeBehaviour == NetUnreliableSizeBehaviour.IgnoreMTU)
            {
                _connection.Peer.LogError(NetLogMessage.FromValues(NetLogCode.MessageSizeExceeded,
                                                                   endPoint: _connection,
                                                                   value: message.BitLength,
                                                                   maxValue: ushort.MaxValue));

                return(NetSendResult.Dropped);
            }

            QueuedSends.Enqueue(message);
            return(NetSendResult.Sent);
        }
 public override NetSendResult Enqueue(NetOutgoingMessage message)
 {
     QueuedSends.Enqueue(message);
     if (QueuedSends.Count <= GetAllowedSends())
     {
         return(NetSendResult.Sent);
     }
     return(NetSendResult.Queued);
 }