System::Net::Sockets::NetworkStream class
Contents
[
Hide
]NetworkStream class
Provides the underlying stream of the data for the network access. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.
class NetworkStream : public System::IO::Stream
Methods
Method | Description |
---|---|
BeginRead(System::ArrayPtr<uint8_t>, int32_t, int32_t, AsyncCallback, System::SharedPtr<Object>) override | Initiates an asynchronous read operation. |
BeginWrite(System::ArrayPtr<uint8_t>, int32_t, int32_t, AsyncCallback, System::SharedPtr<Object>) override | Initiates an asynchronous write operation. |
Close(int) | Closes the current instance after the specified time expires. |
EndRead(System::SharedPtr<IAsyncResult>) override | Waits until the specified asynchronous read operation completes. |
EndWrite(System::SharedPtr<IAsyncResult>) override | Ends an asynchronous write operation. Waits until the specified asynchronous write operation completes. |
Flush() override | Clears this stream’s buffers and writes all buffered data to the underlying storage. |
get_CanRead() const override | RTTI information. |
get_CanSeek() const override | Determines if the stream supports seeking. |
get_CanTimeout() const override | Gets a value that determines whether the current stream can time out. |
get_CanWrite() const override | Determines if the stream is writable. |
get_DataAvailable() const | Returns a value that indicates if the there is available data to read. |
get_Length() const override | Returns the length of the stream in bytes. |
get_Position() const override | Returns the current position of the stream. |
get_ReadTimeout() const override | Gets a value, in milliseconds, that determines how long the stream will attempt to read before timing out. |
get_Socket() | Gets the underlying Socket. |
get_WriteTimeout() const override | Gets a value, in milliseconds, that determines how long the stream will attempt to write before timing out. |
NetworkStream(System::SharedPtr<System::Net::Sockets::Socket>) | Constructs a new instance. |
NetworkStream(System::SharedPtr<System::Net::Sockets::Socket>, System::IO::FileAccess, bool) | Constructs a new instance. |
NetworkStream(System::SharedPtr<System::Net::Sockets::Socket>, bool) | Constructs a new instance. |
Read(const ArrayPtr<uint8_t>&, int32_t, int32_t) override | Reads the specified number of bytes from the stream and writes them to the specified byte array. |
Read(const System::Details::ArrayView<uint8_t>&, int32_t, int32_t) override | Reads the specified number of bytes from the stream and writes them to the specified byte array. |
Seek(int64_t, IO::SeekOrigin) override | Sets the position of the stream represented by the current object. |
set_Position(int64_t) override | Sets the stream’s position. |
set_ReadTimeout(int32_t) override | Sets a value that determines whether the current stream can time out. |
set_WriteTimeout(int32_t) override | Sets a value, in milliseconds, that determines how long the stream will attempt to read before timing out. |
SetLength(int64_t) override | Sets the length of the stream represented by the current object. |
Write(const ArrayPtr<uint8_t>&, int32_t, int32_t) override | Writes the specified subrange of bytes from the specified byte array to the stream. |
Write(const System::Details::ArrayView<uint8_t>&, int32_t, int32_t) override | Writes the specified subrange of bytes from the specified byte array to the stream. |
virtual ~NetworkStream() | Destructs the current instance. |
Fields
Field | Description |
---|---|
static Null | A stream with no underlying storage. |
See Also
- Class Stream
- Namespace System::Net::Sockets
- Library Aspose.PUB for C++