You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/xtd.core/include/xtd/net/sockets/network_stream.hpp
+23-1Lines changed: 23 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -79,6 +79,10 @@ namespace xtd {
79
79
/// @return `true` if the stream supports seeking; otherwise, `false`.
80
80
boolcan_seek() constnoexceptoverride;
81
81
82
+
/// @brief Indicates whether timeout properties are usable for xtd::net::sockets::network_stream.
83
+
/// @return `true` in all cases.
84
+
boolcan_timeout() constnoexceptoverride;
85
+
82
86
/// @brief Gets a value indicating whether the current stream supports writing.
83
87
/// @return `true` if the stream supports writing; otherwise, `false`.
84
88
boolcan_write() constnoexceptoverride;
@@ -101,15 +105,33 @@ namespace xtd {
101
105
/// @param value The current position within the stream.
102
106
voidposition(xtd::size value) override;
103
107
108
+
/// @brief Gets the amount of time that a read operation blocks waiting for data.
109
+
/// @return A xtd::int32 that specifies the amount of time, in milliseconds, that will elapse before a read operation fails. The default value, xtd::threading::timeout::infinite, specifies that the read operation does not time out.
110
+
int32 read_timeout() constoverride;
111
+
/// @brief Sets the amount of time that a read operation blocks waiting for data.
112
+
/// @param value A xtd::int32 that specifies the amount of time, in milliseconds, that will elapse before a read operation fails. The default value, xtd::threading::timeout::infinite, specifies that the read operation does not time out.
113
+
voidread_timeout(int32 value) override;
114
+
115
+
/// @brief Gets the amount of time that a write operation blocks waiting for data.
116
+
/// @return A xtd::int32 that specifies the amount of time, in milliseconds, that will elapse before a read operation fails. The default value, xtd::threading::timeout::infinite, specifies that the read operation does not time out.
117
+
int32 write_timeout() constoverride;
118
+
/// @brief Sets the amount of time that a write operation blocks waiting for data.
119
+
/// @param value A xtd::int32 that specifies the amount of time, in milliseconds, that will elapse before a read operation fails. The default value, xtd::threading::timeout::infinite, specifies that the read operation does not time out.
120
+
voidwrite_timeout(int32 value) override;
121
+
104
122
/// @brief Gets the underlying xtd::net::sockets::socket.
105
123
/// @return A xtd::net::sockets::socket that represents the underlying network connection.
106
-
/// @remarks Classes deriving from xtd::net::sockets::network_stream can use this property to get the underlying xtd::net::sockets::socket. Use the underlying xtd::net::sockets::socket returned from the xtd::net::sockets::socketproperty if you require access beyond that which xtd::net::sockets::network_stream provides.
124
+
/// @remarks Classes deriving from xtd::net::sockets::network_stream can use this property to get the underlying xtd::net::sockets::socket. Use the underlying xtd::net::sockets::socket returned from the xtd::net::sockets::socket property if you require access beyond that which xtd::net::sockets::network_stream provides.
107
125
xtd::net::sockets::socket socket() const;
108
126
/// @}
109
127
110
128
/// @name Public Methods
111
129
112
130
/// @{
131
+
/// @brief Flushes data from the stream. This method is reserved for future use.
132
+
/// @remarks The Flush method implements the xtd::io::stream::flush method; however, because xtd::net::sockets::network_stream is not buffered, it has no effect on network streams. Calling the xtd::net::sockets::network_stream::flush method does not throw an exception.
133
+
voidflush() override;
134
+
113
135
using xtd::io::stream::read;
114
136
/// @brief Reads a block of bytes from the current stream and writes the data to a buffer.
115
137
/// @param buffer When this method returns, contains the specified byte array with the values between `offset` and (`offset` + `count` - 1) replaced by the characters read from the current stream.
0 commit comments