Represents an asynchronous socket operation.
Public Events | |
| xtd::event< socket_async_event_args, xtd::delegate< void(const socket_async_event_args &)> > | completed |
| The event used to complete an asynchronous operation. | |
Public Constructors | |
| socket_async_event_args ()=default | |
| Creates an empty xtd::net::sockets::socket_async_event_args instance. | |
| socket_async_event_args (bool suppress_execution_context_flow) | |
| Initializes the SocketAsyncEventArgs. | |
Public Properties | |
| auto | accept_socket () const noexcept -> xtd::net::sockets::socket |
| Gets the socket to use or the socket created for accepting a connection with an asynchronous socket method. | |
| auto | accept_socket (const xtd::net::sockets::socket &value) noexcept -> socket_async_event_args & |
| Sets the socket to use or the socket created for accepting a connection with an asynchronous socket method. | |
| auto | buffer () const noexcept -> const xtd::array< xtd::byte > & |
| Gets the data buffer to use with an asynchronous socket method. | |
| auto | buffer () noexcept -> xtd::array< xtd::byte > & |
| Gets the data buffer to use with an asynchronous socket method. | |
Public Methods | |
| auto | set_buffer (const xtd::array< xtd::byte > &memory_buffer) -> void |
| Sets the region of memory to use as a buffer with an asynchronous socket method. | |
| auto | set_buffer (xtd::usize offset, xtd::usize count) -> void |
| Sets the data buffer to use with an asynchronous socket method. | |
| auto | set_buffer (const xtd::array< xtd::byte > &buffer, xtd::usize offset, xtd::usize count) -> void |
| Sets the data buffer to use with an asynchronous socket method. | |
Protected Methods | |
| virtual auto | on_complete (const socket_async_event_args &e) -> void |
| Represents a method that is called when an asynchronous operation completes. | |
Additional Inherited Members | |
| static const event_args | empty |
| Provides a value to use with events that do not have event data. | |
| event_args ()=default | |
| Initializes a new instance of the event_args class. | |
| object ()=default | |
| Create a new instance of the ultimate base class object. | |
| virtual auto | equals (const object &obj) const noexcept -> bool |
| Determines whether the specified object is equal to the current object. | |
| virtual auto | get_hash_code () const noexcept -> xtd::usize |
| Serves as a hash function for a particular type. | |
| virtual auto | get_type () const noexcept -> type_object |
| Gets the type of the current instance. | |
| template<typename object_t> | |
| auto | memberwise_clone () const -> xtd::unique_ptr_object< object_t > |
| Creates a shallow copy of the current object. | |
| virtual auto | to_string () const -> xtd::string |
| Returns a xtd::string that represents the current object. | |
| template<typename object_a_t, typename object_b_t> | |
| static auto | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool |
| Determines whether the specified object instances are considered equal. | |
| template<typename object_a_t, typename object_b_t> | |
| static auto | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool |
| Determines whether the specified object instances are the same instance. | |
|
default |
Creates an empty xtd::net::sockets::socket_async_event_args instance.
|
explicit |
Initializes the SocketAsyncEventArgs.
| suppress_execution_context_flow | Whether to disable the capturing and flow of execution context. Execution context flow should only be disabled if it's handled by higher layers. |
|
nodiscardnoexcept |
Gets the socket to use or the socket created for accepting a connection with an asynchronous socket method.
|
noexcept |
Sets the socket to use or the socket created for accepting a connection with an asynchronous socket method.
| value | The xtd::net::sockets::socket to use or the socket created for accepting a connection with an asynchronous socket method. |
|
nodiscardnoexcept |
Gets the data buffer to use with an asynchronous socket method.
|
nodiscardnoexcept |
Gets the data buffer to use with an asynchronous socket method.
| auto xtd::net::sockets::socket_async_event_args::set_buffer | ( | const xtd::array< xtd::byte > & | memory_buffer | ) | -> void |
Sets the region of memory to use as a buffer with an asynchronous socket method.
| memory_buffer | The region of memory to use as a buffer with an asynchronous socket method. |
| auto xtd::net::sockets::socket_async_event_args::set_buffer | ( | xtd::usize | offset, |
| xtd::usize | count ) -> void |
Sets the data buffer to use with an asynchronous socket method.
| offset | The offset, in bytes, in the data buffer where the operation starts. |
| count | The maximum amount of data, in bytes, to send or receive in the buffer. |
| xtd::argument_out_of_range_exception | An argument was out of range. This exception occurs if the offset parameter is greater than the length of the array in the xtd::net::sockets::socket_async_event_args::buffer property. This exception also occurs if the count parameter is greater than the length of the array in the xtd::net::sockets::socket_async_event_args::buffer property minus the offset parameter. |
| auto xtd::net::sockets::socket_async_event_args::set_buffer | ( | const xtd::array< xtd::byte > & | buffer, |
| xtd::usize | offset, | ||
| xtd::usize | count ) -> void |
Sets the data buffer to use with an asynchronous socket method.
| buffer | The data buffer to use with an asynchronous socket method. |
| offset | The offset, in bytes, in the data buffer where the operation starts. |
| count | The maximum amount of data, in bytes, to send or receive in the buffer. |
| xtd::argument_out_of_range_exception | An argument was out of range. This exception occurs if the offset parameter is greater than the length of the array in the xtd::net::sockets::socket_async_event_args::buffer property. This exception also occurs if the count parameter is greater than the length of the array in the xtd::net::sockets::socket_async_event_args::buffer property minus the offset parameter. |
|
protectedvirtual |
Represents a method that is called when an asynchronous operation completes.
| e | The event that is signaled. |
| xtd::event<socket_async_event_args, xtd::delegate<void(const socket_async_event_args&)> > xtd::net::sockets::socket_async_event_args::completed |
The event used to complete an asynchronous operation.