Example #1
0
 public ByteBlock GetBlock()
 {
     if (block == null)
     {
         block = bytePool.Get();
     }
     return(block);
 }
Example #2
0
        public ByteBlock GetSendingBlock()
        {
            if (isCreateSendingBlock())
            {
                return(null);
            }

            if (block == null)
            {
                block = bytePool.Get(bufferSize);
            }

            createSendingBlock(block);

            exitCreateSendingBlock();

            return(block);
        }