Add move support to kqueue_reactor.
This commit is contained in:
parent
36cf06a953
commit
928d38a2ac
@ -164,6 +164,14 @@ int kqueue_reactor::register_internal_descriptor(
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void kqueue_reactor::move_descriptor(socket_type,
|
||||||
|
kqueue_reactor::per_descriptor_data& target_descriptor_data,
|
||||||
|
kqueue_reactor::per_descriptor_data& source_descriptor_data)
|
||||||
|
{
|
||||||
|
target_descriptor_data = source_descriptor_data;
|
||||||
|
source_descriptor_data = 0;
|
||||||
|
}
|
||||||
|
|
||||||
void kqueue_reactor::start_op(int op_type, socket_type descriptor,
|
void kqueue_reactor::start_op(int op_type, socket_type descriptor,
|
||||||
kqueue_reactor::per_descriptor_data& descriptor_data,
|
kqueue_reactor::per_descriptor_data& descriptor_data,
|
||||||
reactor_op* op, bool allow_speculative)
|
reactor_op* op, bool allow_speculative)
|
||||||
|
@ -99,6 +99,11 @@ public:
|
|||||||
int op_type, socket_type descriptor,
|
int op_type, socket_type descriptor,
|
||||||
per_descriptor_data& descriptor_data, reactor_op* op);
|
per_descriptor_data& descriptor_data, reactor_op* op);
|
||||||
|
|
||||||
|
// Move descriptor registration from one descriptor_data object to another.
|
||||||
|
ASIO_DECL void move_descriptor(socket_type descriptor,
|
||||||
|
per_descriptor_data& target_descriptor_data,
|
||||||
|
per_descriptor_data& source_descriptor_data);
|
||||||
|
|
||||||
// Post a reactor operation for immediate completion.
|
// Post a reactor operation for immediate completion.
|
||||||
void post_immediate_completion(reactor_op* op)
|
void post_immediate_completion(reactor_op* op)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user