Add move support to kqueue_reactor.

This commit is contained in:
Christopher Kohlhoff 2011-03-07 00:14:05 +11:00
parent 36cf06a953
commit 928d38a2ac
2 changed files with 13 additions and 0 deletions

View File

@ -164,6 +164,14 @@ int kqueue_reactor::register_internal_descriptor(
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,
kqueue_reactor::per_descriptor_data& descriptor_data,
reactor_op* op, bool allow_speculative)

View File

@ -99,6 +99,11 @@ public:
int op_type, socket_type descriptor,
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.
void post_immediate_completion(reactor_op* op)
{