172 bool owns_socket =
false;
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:61
Provides a generic view of a sequence of bytes. This is an abstract class.
Definition stream.hpp:40
stream()
Initializes a new instance of the xtd::io::stream class.
void set_length(xtd::size value) override
Sets the length of the current stream to the specified value.
bool can_write() const noexcept override
Gets a value indicating whether the current stream supports writing.
bool can_timeout() const noexcept override
Indicates whether timeout properties are usable for xtd::net::sockets::network_stream.
xtd::size length() const override
Gets the length of the stream in bytes.
bool can_read() const noexcept override
Gets a value indicating whether the current stream supports reading.
void write(const xtd::array< xtd::byte > &buffer, size offset, size count) override
Writes a block of bytes to the current stream using data read from a buffer.
int32 write_timeout() const override
Gets the amount of time that a write operation blocks waiting for data.
xtd::size read(xtd::array< xtd::byte > &buffer, size offset, size count) override
Reads a block of bytes from the current stream and writes the data to a buffer.
network_stream(const xtd::net::sockets::socket &socket, xtd::io::file_access access)
Initializes a new instance of the network_stream class for the specified xtd::net::sockets::socket wi...
network_stream(const xtd::net::sockets::socket &socket)
Creates a new instance of the network_stream class for the specified xtd::net::sockets::socket.
xtd::size position() const override
Gets the current position within the stream.
network_stream(const xtd::net::sockets::socket &socket, bool owns_socket)
Initializes a new instance of the xtd::net::sockets::network_stream class for the specified xtd::net:...
network_stream(const xtd::net::sockets::socket &socket, xtd::io::file_access access, bool owns_socket)
Initializes a new instance of the network_stream class for the specified xtd::net::sockets::socket wi...
xtd::net::sockets::socket socket() const
Gets the underlying xtd::net::sockets::socket.
int32 read_timeout() const override
Gets the amount of time that a read operation blocks waiting for data.
void flush() override
Flushes data from the stream. This method is reserved for future use.
bool can_seek() const noexcept override
Gets a value indicating whether the current stream supports seeking.
virtual bool data_available() const
Gets a value that indicates whether data is available on the xtd::net::sockets::network_stream to be ...
Implements the Berkeley sockets interface.
Definition socket.hpp:77
Contains xtd::io::file_access enum class.
#define core_export_
Define shared library export.
Definition core_export.hpp:13
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
xtd::sptr< type_t > ptr
The xtd::ptr object is a shared pointer.
Definition ptr.hpp:27
ptr< type_t > new_ptr(args_t &&... args)
The xtd::new_ptr operator creates a xtd::ptr object.
Definition new_ptr.hpp:24
file_access
Defines constants for read, write, or read/write access to a file. This enumeration has a flags attri...
Definition file_access.hpp:15
@ read_write
The file is a read_write file. The file is part of the operating read_write or is used exclusively by...
Definition file_access.hpp:21
The xtd::io namespace contains types that allow reading and writing to files and data streams,...
Definition binary_reader.hpp:17
The xtd::net::sockets namespace provides a managed implementation of the Berkeley Sockets interface f...
Definition address_family.hpp:16
The xtd::net namespace provides a simple programming interface for many of the protocols used on netw...
Definition cookie_exception.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::not_supported_exception exception.
Contains xtd::object_closed_exception exception.
Contains xtd::net::sockets::socket class.
Contains xtd::io::stream class.