id summary reporter owner description type status milestone component version severity resolution keywords cc 4170 Error using null_buffers in async_send_to in Windows nythil@… chris_kohlhoff "While exploring the boost.asio library I came across a bug caused by a typo in one of the header files. When async_send_to is invoked on an UDP socket with null_buffers, the following sequence of calls takes place: 1. {{{basic_datagram_socket->async_send_to(const ConstBufferSequence& buffers, const endpoint_type& destination, WriteHandler handler)}}} 2. {{{datagram_socket_service->async_send_to(implementation_type& impl, const ConstBufferSequence& buffers, const endpoint_type& destination, socket_base::message_flags flags, WriteHandler handler)}}} 3. {{{win_iocp_socket_service->async_send_to(implementation_type& impl, const ConstBufferSequence& buffers, const endpoint_type& destination, socket_base::message_flags flags, Handler handler)}}} The problem is, the 3rd function is the generic version of async_send_to() which expects a valid buffer. Passing null_buffers causes an error. There is also a specialization of async_send_to() for the null_buffers case. Unfortunately, it's never called, because in the declaration some arguments are out of place. The declaration is: {{{async_send_to(implementation_type& impl, const null_buffers&, socket_base::message_flags, const endpoint_type&, Handler handler)}}}. Compared to the generic version, the {{{flags}}} and {{{destination}}} arguments are swapped. After correcting the order of these two arguments, async_send_to() works as expected." Bugs closed Boost 1.44.0 asio Boost Development Trunk Problem fixed