The descriptor_ field of reactor_op_cancellation has int type and it is used to store the socket descriptor, but in 64-bit Windows the SOCKET type is an alias of ULONG_PTR and has size of 64 bits.
This may cause:
possible loss of socket descriptor in conversion of socket_type to int in 64-bit Windows
appearance of lot of conversion warnings when compiling asio dependent code for 64-bit Windows.
The
descriptor_
field ofreactor_op_cancellation
hasint
type and it is used to store the socket descriptor, but in 64-bit Windows theSOCKET
type is an alias ofULONG_PTR
and has size of 64 bits.This may cause:
socket_type
toint
in 64-bit Windowsasio
dependent code for 64-bit Windows.This pull requests fixes the issue.