Read()

NetworkStream::Read(const ArrayPtr<uint8_t>&, int32_t, int32_t) method

Reads the specified number of bytes from the stream and writes them to the specified byte array.

int32_t System::Net::Sockets::NetworkStream::Read(const ArrayPtr<uint8_t> &buffer, int32_t offset, int32_t size) override

Arguments

ParameterTypeDescription
bufferconst ArrayPtr<uint8_t>&The byte array where the read bytes will be written.
offsetint32_tThe offset in bytes in the specified array.
sizeint32_tThe number of bytes to read.

Return Value

The number of read bytes.

NetworkStream::Read(const System::Details::ArrayView<uint8_t>&, int32_t, int32_t) method

Reads the specified number of bytes from the stream and writes them to the specified byte array.

int32_t System::Net::Sockets::NetworkStream::Read(const System::Details::ArrayView<uint8_t> &buffer, int32_t offset, int32_t size) override

Arguments

ParameterTypeDescription
bufferconst System::Details::ArrayView<uint8_t>&The byte array view to write the read bytes to
offsetint32_tA 0-based position in buffer to start writing at
sizeint32_tThe number of bytes to read

Return Value

The number of bytes read

See Also