Example #1
0
        public async ValueTask <int> ReadInt32Async(CancellationToken cancellationToken = default)
        {
            await ReadBytesAsync(_smallBuffer, 4, cancellationToken).ConfigureAwait(false);

            return(TypeDecoder.DecodeInt32(_smallBuffer));
        }
        public async Task <int> ReadInt32(AsyncWrappingCommonArgs async)
        {
            await ReadBytes(_smallBuffer, 4, async).ConfigureAwait(false);

            return(TypeDecoder.DecodeInt32(_smallBuffer));
        }
Example #3
0
 public int ReadInt32()
 {
     ReadBytes(_smallBuffer, 4);
     return(TypeDecoder.DecodeInt32(_smallBuffer));
 }
Example #4
0
        public async Task <int> ReadInt32Async()
        {
            await ReadBytesAsync(_smallBuffer, 4).ConfigureAwait(false);

            return(TypeDecoder.DecodeInt32(_smallBuffer));
        }