You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by aa...@apache.org on 2020/07/15 04:40:01 UTC

[hadoop] branch trunk updated: HDFS-15385 Upgrade boost library to 1.72 (#2051)

This is an automated email from the ASF dual-hosted git repository.

aajisaka pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new cce5a6f  HDFS-15385 Upgrade boost library to 1.72 (#2051)
cce5a6f is described below

commit cce5a6f6094cefd2e23b73d202cc173cf4fc2cc5
Author: Gautham B A <ga...@gmail.com>
AuthorDate: Wed Jul 15 10:09:48 2020 +0530

    HDFS-15385 Upgrade boost library to 1.72 (#2051)
    
    * Removed the asio-1.10.2 that was
      checked in under libhdfspp/third_party
      directory.
---
 BUILDING.txt                                       |    8 +
 dev-support/docker/Dockerfile                      |   15 +
 dev-support/docker/Dockerfile_aarch64              |   15 +
 .../hadoop-hdfs-native-client/src/CMakeLists.txt   |    2 +
 .../src/main/native/libhdfspp/CMakeLists.txt       |    4 +-
 .../native/libhdfspp/include/hdfspp/ioservice.h    |    7 +-
 .../native/libhdfspp/lib/common/CMakeLists.txt     |    1 +
 .../native/libhdfspp/lib/common/async_stream.h     |   21 +-
 .../libhdfspp/lib/common/continuation/asio.h       |    9 +-
 .../libhdfspp/lib/common/continuation/protobuf.h   |   16 +-
 .../src/main/native/libhdfspp/lib/common/fsinfo.cc |    2 +
 .../native/libhdfspp/lib/common/ioservice_impl.cc  |    4 +-
 .../native/libhdfspp/lib/common/ioservice_impl.h   |    6 +-
 .../main/native/libhdfspp/lib/common/logging.cc    |    2 +-
 .../src/main/native/libhdfspp/lib/common/logging.h |    4 +-
 .../native/libhdfspp/lib/common/namenode_info.cc   |   10 +-
 .../native/libhdfspp/lib/common/namenode_info.h    |    4 +-
 .../native/libhdfspp/lib/common/retry_policy.cc    |    4 +-
 .../src/main/native/libhdfspp/lib/common/util.cc   |    6 +-
 .../src/main/native/libhdfspp/lib/common/util.h    |   13 +-
 .../libhdfspp/lib/connection/datanodeconnection.cc |   12 +-
 .../libhdfspp/lib/connection/datanodeconnection.h  |   13 +-
 .../src/main/native/libhdfspp/lib/fs/filehandle.cc |    8 +-
 .../src/main/native/libhdfspp/lib/fs/filesystem.cc |    4 +-
 .../native/libhdfspp/lib/fs/namenode_operations.cc |    4 +-
 .../native/libhdfspp/lib/reader/block_reader.cc    |   34 +-
 .../native/libhdfspp/lib/reader/datatransfer.h     |    6 +-
 .../libhdfspp/lib/reader/datatransfer_impl.h       |    6 +-
 .../native/libhdfspp/lib/rpc/namenode_tracker.cc   |    8 +-
 .../native/libhdfspp/lib/rpc/namenode_tracker.h    |    8 +-
 .../src/main/native/libhdfspp/lib/rpc/request.h    |    6 +-
 .../main/native/libhdfspp/lib/rpc/rpc_connection.h |   14 +-
 .../libhdfspp/lib/rpc/rpc_connection_impl.cc       |   12 +-
 .../native/libhdfspp/lib/rpc/rpc_connection_impl.h |   88 +-
 .../main/native/libhdfspp/lib/rpc/rpc_engine.cc    |    8 +-
 .../src/main/native/libhdfspp/lib/rpc/rpc_engine.h |    8 +-
 .../src/main/native/libhdfspp/tests/CMakeLists.txt |    4 +-
 .../native/libhdfspp/tests/bad_datanode_test.cc    |   21 +-
 .../main/native/libhdfspp/tests/mock_connection.cc |    4 +-
 .../main/native/libhdfspp/tests/mock_connection.h  |   44 +-
 .../libhdfspp/tests/remote_block_reader_test.cc    |   35 +-
 .../main/native/libhdfspp/tests/rpc_engine_test.cc |   64 +-
 .../libhdfspp/third_party/asio-1.10.2/COPYING      |    4 -
 .../third_party/asio-1.10.2/include/asio.hpp       |  122 -
 .../asio-1.10.2/include/asio/async_result.hpp      |   94 -
 .../include/asio/basic_datagram_socket.hpp         |  949 ------
 .../include/asio/basic_deadline_timer.hpp          |  520 ---
 .../asio-1.10.2/include/asio/basic_io_object.hpp   |  240 --
 .../asio-1.10.2/include/asio/basic_raw_socket.hpp  |  940 ------
 .../include/asio/basic_seq_packet_socket.hpp       |  565 ----
 .../asio-1.10.2/include/asio/basic_serial_port.hpp |  695 ----
 .../asio-1.10.2/include/asio/basic_signal_set.hpp  |  384 ---
 .../asio-1.10.2/include/asio/basic_socket.hpp      | 1518 ---------
 .../include/asio/basic_socket_acceptor.hpp         | 1136 -------
 .../include/asio/basic_socket_iostream.hpp         |  286 --
 .../include/asio/basic_socket_streambuf.hpp        |  567 ----
 .../include/asio/basic_stream_socket.hpp           |  852 -----
 .../asio-1.10.2/include/asio/basic_streambuf.hpp   |  369 ---
 .../include/asio/basic_streambuf_fwd.hpp           |   33 -
 .../include/asio/basic_waitable_timer.hpp          |  519 ---
 .../asio-1.10.2/include/asio/buffer.hpp            | 2239 -------------
 .../include/asio/buffered_read_stream.hpp          |  244 --
 .../include/asio/buffered_read_stream_fwd.hpp      |   25 -
 .../asio-1.10.2/include/asio/buffered_stream.hpp   |  258 --
 .../include/asio/buffered_stream_fwd.hpp           |   25 -
 .../include/asio/buffered_write_stream.hpp         |  236 --
 .../include/asio/buffered_write_stream_fwd.hpp     |   25 -
 .../asio-1.10.2/include/asio/buffers_iterator.hpp  |  481 ---
 .../include/asio/completion_condition.hpp          |  218 --
 .../asio-1.10.2/include/asio/connect.hpp           |  823 -----
 .../asio-1.10.2/include/asio/coroutine.hpp         |  328 --
 .../include/asio/datagram_socket_service.hpp       |  432 ---
 .../asio-1.10.2/include/asio/deadline_timer.hpp    |   63 -
 .../include/asio/deadline_timer_service.hpp        |  173 -
 .../asio-1.10.2/include/asio/detail/addressof.hpp  |   38 -
 .../asio-1.10.2/include/asio/detail/array.hpp      |   38 -
 .../asio-1.10.2/include/asio/detail/array_fwd.hpp  |   34 -
 .../asio-1.10.2/include/asio/detail/assert.hpp     |   32 -
 .../include/asio/detail/atomic_count.hpp           |   45 -
 .../asio/detail/base_from_completion_cond.hpp      |   68 -
 .../include/asio/detail/bind_handler.hpp           |  489 ---
 .../include/asio/detail/buffer_resize_guard.hpp    |   66 -
 .../asio/detail/buffer_sequence_adapter.hpp        |  383 ---
 .../asio/detail/buffered_stream_storage.hpp        |  126 -
 .../asio-1.10.2/include/asio/detail/call_stack.hpp |  125 -
 .../include/asio/detail/chrono_time_traits.hpp     |  190 --
 .../include/asio/detail/completion_handler.hpp     |   81 -
 .../asio-1.10.2/include/asio/detail/config.hpp     |  895 ------
 .../include/asio/detail/consuming_buffers.hpp      |  292 --
 .../asio-1.10.2/include/asio/detail/cstdint.hpp    |   46 -
 .../include/asio/detail/date_time_fwd.hpp          |   34 -
 .../include/asio/detail/deadline_timer_service.hpp |  227 --
 .../include/asio/detail/dependent_type.hpp         |   36 -
 .../include/asio/detail/descriptor_ops.hpp         |  117 -
 .../include/asio/detail/descriptor_read_op.hpp     |  119 -
 .../include/asio/detail/descriptor_write_op.hpp    |  119 -
 .../include/asio/detail/dev_poll_reactor.hpp       |  210 --
 .../include/asio/detail/epoll_reactor.hpp          |  242 --
 .../asio-1.10.2/include/asio/detail/event.hpp      |   48 -
 .../asio/detail/eventfd_select_interrupter.hpp     |   83 -
 .../include/asio/detail/fd_set_adapter.hpp         |   39 -
 .../include/asio/detail/fenced_block.hpp           |   76 -
 .../asio-1.10.2/include/asio/detail/function.hpp   |   38 -
 .../include/asio/detail/gcc_arm_fenced_block.hpp   |   89 -
 .../include/asio/detail/gcc_hppa_fenced_block.hpp  |   66 -
 .../include/asio/detail/gcc_sync_fenced_block.hpp  |   63 -
 .../include/asio/detail/gcc_x86_fenced_block.hpp   |   89 -
 .../include/asio/detail/handler_alloc_helpers.hpp  |   82 -
 .../include/asio/detail/handler_cont_helpers.hpp   |   45 -
 .../include/asio/detail/handler_invoke_helpers.hpp |   57 -
 .../include/asio/detail/handler_tracking.hpp       |  159 -
 .../asio/detail/handler_type_requirements.hpp      |  488 ---
 .../asio-1.10.2/include/asio/detail/hash_map.hpp   |  331 --
 .../asio/detail/impl/buffer_sequence_adapter.ipp   |  118 -
 .../include/asio/detail/impl/descriptor_ops.ipp    |  451 ---
 .../include/asio/detail/impl/dev_poll_reactor.hpp  |   78 -
 .../include/asio/detail/impl/dev_poll_reactor.ipp  |  445 ---
 .../include/asio/detail/impl/epoll_reactor.hpp     |   76 -
 .../include/asio/detail/impl/epoll_reactor.ipp     |  662 ----
 .../detail/impl/eventfd_select_interrupter.ipp     |  165 -
 .../include/asio/detail/impl/handler_tracking.ipp  |  305 --
 .../include/asio/detail/impl/kqueue_reactor.hpp    |   80 -
 .../include/asio/detail/impl/kqueue_reactor.ipp    |  463 ---
 .../asio/detail/impl/pipe_select_interrupter.ipp   |  124 -
 .../include/asio/detail/impl/posix_event.ipp       |   47 -
 .../include/asio/detail/impl/posix_mutex.ipp       |   46 -
 .../include/asio/detail/impl/posix_thread.ipp      |   74 -
 .../include/asio/detail/impl/posix_tss_ptr.ipp     |   46 -
 .../detail/impl/reactive_descriptor_service.ipp    |  208 --
 .../detail/impl/reactive_serial_port_service.ipp   |  151 -
 .../detail/impl/reactive_socket_service_base.ipp   |  267 --
 .../asio/detail/impl/resolver_service_base.ipp     |  130 -
 .../include/asio/detail/impl/select_reactor.hpp    |   87 -
 .../include/asio/detail/impl/select_reactor.ipp    |  313 --
 .../include/asio/detail/impl/service_registry.hpp  |   88 -
 .../include/asio/detail/impl/service_registry.ipp  |  188 --
 .../asio/detail/impl/signal_set_service.ipp        |  647 ----
 .../include/asio/detail/impl/socket_ops.ipp        | 3394 --------------------
 .../asio/detail/impl/socket_select_interrupter.ipp |  175 -
 .../include/asio/detail/impl/strand_service.hpp    |  118 -
 .../include/asio/detail/impl/strand_service.ipp    |  176 -
 .../include/asio/detail/impl/task_io_service.hpp   |   78 -
 .../include/asio/detail/impl/task_io_service.ipp   |  474 ---
 .../include/asio/detail/impl/throw_error.ipp       |   60 -
 .../include/asio/detail/impl/timer_queue_ptime.ipp |   84 -
 .../include/asio/detail/impl/timer_queue_set.ipp   |  101 -
 .../include/asio/detail/impl/win_event.ipp         |   67 -
 .../asio/detail/impl/win_iocp_handle_service.ipp   |  528 ---
 .../asio/detail/impl/win_iocp_io_service.hpp       |  130 -
 .../asio/detail/impl/win_iocp_io_service.ipp       |  531 ---
 .../detail/impl/win_iocp_serial_port_service.ipp   |  180 --
 .../detail/impl/win_iocp_socket_service_base.ipp   |  728 -----
 .../include/asio/detail/impl/win_mutex.ipp         |   78 -
 .../asio/detail/impl/win_object_handle_service.ipp |  444 ---
 .../include/asio/detail/impl/win_static_mutex.ipp  |  118 -
 .../include/asio/detail/impl/win_thread.ipp        |  139 -
 .../include/asio/detail/impl/win_tss_ptr.ipp       |   57 -
 .../detail/impl/winrt_ssocket_service_base.ipp     |  612 ----
 .../asio/detail/impl/winrt_timer_scheduler.hpp     |   79 -
 .../asio/detail/impl/winrt_timer_scheduler.ipp     |  122 -
 .../include/asio/detail/impl/winsock_init.ipp      |   82 -
 .../asio-1.10.2/include/asio/detail/io_control.hpp |  134 -
 .../include/asio/detail/keyword_tss_ptr.hpp        |   70 -
 .../include/asio/detail/kqueue_reactor.hpp         |  219 --
 .../asio-1.10.2/include/asio/detail/limits.hpp     |   26 -
 .../asio/detail/local_free_on_block_exit.hpp       |   57 -
 .../include/asio/detail/macos_fenced_block.hpp     |   61 -
 .../asio-1.10.2/include/asio/detail/mutex.hpp      |   48 -
 .../include/asio/detail/noncopyable.hpp            |   43 -
 .../asio-1.10.2/include/asio/detail/null_event.hpp |   88 -
 .../include/asio/detail/null_fenced_block.hpp      |   45 -
 .../asio-1.10.2/include/asio/detail/null_mutex.hpp |   64 -
 .../include/asio/detail/null_reactor.hpp           |   67 -
 .../include/asio/detail/null_signal_blocker.hpp    |   69 -
 .../include/asio/detail/null_socket_service.hpp    |  497 ---
 .../include/asio/detail/null_static_mutex.hpp      |   60 -
 .../include/asio/detail/null_thread.hpp            |   61 -
 .../include/asio/detail/null_tss_ptr.hpp           |   68 -
 .../include/asio/detail/object_pool.hpp            |  146 -
 .../include/asio/detail/old_win_sdk_compat.hpp     |  214 --
 .../asio-1.10.2/include/asio/detail/op_queue.hpp   |  156 -
 .../asio-1.10.2/include/asio/detail/operation.hpp  |   38 -
 .../asio/detail/pipe_select_interrupter.hpp        |   89 -
 .../include/asio/detail/pop_options.hpp            |  105 -
 .../include/asio/detail/posix_event.hpp            |  126 -
 .../include/asio/detail/posix_fd_set_adapter.hpp   |  118 -
 .../include/asio/detail/posix_mutex.hpp            |   76 -
 .../include/asio/detail/posix_signal_blocker.hpp   |   85 -
 .../include/asio/detail/posix_static_mutex.hpp     |   64 -
 .../include/asio/detail/posix_thread.hpp           |  105 -
 .../include/asio/detail/posix_tss_ptr.hpp          |   79 -
 .../include/asio/detail/push_options.hpp           |  138 -
 .../asio/detail/reactive_descriptor_service.hpp    |  322 --
 .../asio/detail/reactive_null_buffers_op.hpp       |   88 -
 .../asio/detail/reactive_serial_port_service.hpp   |  234 --
 .../asio/detail/reactive_socket_accept_op.hpp      |  136 -
 .../asio/detail/reactive_socket_connect_op.hpp     |  106 -
 .../asio/detail/reactive_socket_recv_op.hpp        |  123 -
 .../asio/detail/reactive_socket_recvfrom_op.hpp    |  133 -
 .../asio/detail/reactive_socket_recvmsg_op.hpp     |  125 -
 .../asio/detail/reactive_socket_send_op.hpp        |  120 -
 .../asio/detail/reactive_socket_sendto_op.hpp      |  123 -
 .../asio/detail/reactive_socket_service.hpp        |  457 ---
 .../asio/detail/reactive_socket_service_base.hpp   |  450 ---
 .../asio-1.10.2/include/asio/detail/reactor.hpp    |   32 -
 .../include/asio/detail/reactor_fwd.hpp            |   40 -
 .../asio-1.10.2/include/asio/detail/reactor_op.hpp |   61 -
 .../include/asio/detail/reactor_op_queue.hpp       |  168 -
 .../asio-1.10.2/include/asio/detail/regex_fwd.hpp  |   35 -
 .../include/asio/detail/resolve_endpoint_op.hpp    |  121 -
 .../asio-1.10.2/include/asio/detail/resolve_op.hpp |  131 -
 .../include/asio/detail/resolver_service.hpp       |  129 -
 .../include/asio/detail/resolver_service_base.hpp  |  129 -
 .../include/asio/detail/scoped_lock.hpp            |  101 -
 .../asio-1.10.2/include/asio/detail/scoped_ptr.hpp |   79 -
 .../include/asio/detail/select_interrupter.hpp     |   46 -
 .../include/asio/detail/select_reactor.hpp         |  219 --
 .../include/asio/detail/service_registry.hpp       |  156 -
 .../asio-1.10.2/include/asio/detail/shared_ptr.hpp |   38 -
 .../include/asio/detail/signal_blocker.hpp         |   44 -
 .../include/asio/detail/signal_handler.hpp         |   82 -
 .../include/asio/detail/signal_init.hpp            |   47 -
 .../asio-1.10.2/include/asio/detail/signal_op.hpp  |   49 -
 .../include/asio/detail/signal_set_service.hpp     |  216 --
 .../include/asio/detail/socket_holder.hpp          |   98 -
 .../asio-1.10.2/include/asio/detail/socket_ops.hpp |  334 --
 .../include/asio/detail/socket_option.hpp          |  316 --
 .../asio/detail/socket_select_interrupter.hpp      |   91 -
 .../include/asio/detail/socket_types.hpp           |  404 ---
 .../include/asio/detail/solaris_fenced_block.hpp   |   61 -
 .../include/asio/detail/static_mutex.hpp           |   52 -
 .../asio-1.10.2/include/asio/detail/std_event.hpp  |  176 -
 .../asio-1.10.2/include/asio/detail/std_mutex.hpp  |   73 -
 .../include/asio/detail/std_static_mutex.hpp       |   81 -
 .../asio-1.10.2/include/asio/detail/std_thread.hpp |   65 -
 .../include/asio/detail/strand_service.hpp         |  142 -
 .../include/asio/detail/task_io_service.hpp        |  201 --
 .../asio/detail/task_io_service_operation.hpp      |   76 -
 .../asio/detail/task_io_service_thread_info.hpp    |   40 -
 .../asio-1.10.2/include/asio/detail/thread.hpp     |   56 -
 .../include/asio/detail/thread_info_base.hpp       |   91 -
 .../include/asio/detail/throw_error.hpp            |   53 -
 .../include/asio/detail/throw_exception.hpp        |   51 -
 .../include/asio/detail/timer_queue.hpp            |  332 --
 .../include/asio/detail/timer_queue_base.hpp       |   68 -
 .../include/asio/detail/timer_queue_ptime.hpp      |   93 -
 .../include/asio/detail/timer_queue_set.hpp        |   66 -
 .../include/asio/detail/timer_scheduler.hpp        |   35 -
 .../include/asio/detail/timer_scheduler_fwd.hpp    |   40 -
 .../asio-1.10.2/include/asio/detail/tss_ptr.hpp    |   69 -
 .../include/asio/detail/type_traits.hpp            |   58 -
 .../include/asio/detail/variadic_templates.hpp     |   63 -
 .../include/asio/detail/wait_handler.hpp           |   83 -
 .../asio-1.10.2/include/asio/detail/wait_op.hpp    |   45 -
 .../asio-1.10.2/include/asio/detail/weak_ptr.hpp   |   38 -
 .../asio-1.10.2/include/asio/detail/win_event.hpp  |  126 -
 .../include/asio/detail/win_fd_set_adapter.hpp     |  149 -
 .../include/asio/detail/win_fenced_block.hpp       |   89 -
 .../asio/detail/win_iocp_handle_read_op.hpp        |  109 -
 .../asio/detail/win_iocp_handle_service.hpp        |  322 --
 .../asio/detail/win_iocp_handle_write_op.hpp       |  101 -
 .../include/asio/detail/win_iocp_io_service.hpp    |  315 --
 .../asio/detail/win_iocp_null_buffers_op.hpp       |  119 -
 .../include/asio/detail/win_iocp_operation.hpp     |   95 -
 .../include/asio/detail/win_iocp_overlapped_op.hpp |   88 -
 .../asio/detail/win_iocp_overlapped_ptr.hpp        |  144 -
 .../asio/detail/win_iocp_serial_port_service.hpp   |  228 --
 .../asio/detail/win_iocp_socket_accept_op.hpp      |  165 -
 .../asio/detail/win_iocp_socket_connect_op.hpp     |  124 -
 .../asio/detail/win_iocp_socket_recv_op.hpp        |  115 -
 .../asio/detail/win_iocp_socket_recvfrom_op.hpp    |  123 -
 .../asio/detail/win_iocp_socket_recvmsg_op.hpp     |  116 -
 .../asio/detail/win_iocp_socket_send_op.hpp        |  109 -
 .../asio/detail/win_iocp_socket_service.hpp        |  525 ---
 .../asio/detail/win_iocp_socket_service_base.hpp   |  524 ---
 .../include/asio/detail/win_iocp_thread_info.hpp   |   34 -
 .../asio-1.10.2/include/asio/detail/win_mutex.hpp  |   78 -
 .../asio/detail/win_object_handle_service.hpp      |  183 --
 .../include/asio/detail/win_static_mutex.hpp       |   74 -
 .../asio-1.10.2/include/asio/detail/win_thread.hpp |  139 -
 .../include/asio/detail/win_tss_ptr.hpp            |   79 -
 .../include/asio/detail/wince_thread.hpp           |  116 -
 .../include/asio/detail/winrt_async_manager.hpp    |  294 --
 .../include/asio/detail/winrt_async_op.hpp         |   65 -
 .../include/asio/detail/winrt_resolve_op.hpp       |  117 -
 .../include/asio/detail/winrt_resolver_service.hpp |  183 --
 .../asio/detail/winrt_socket_connect_op.hpp        |   90 -
 .../include/asio/detail/winrt_socket_recv_op.hpp   |  110 -
 .../include/asio/detail/winrt_socket_send_op.hpp   |  101 -
 .../include/asio/detail/winrt_ssocket_service.hpp  |  232 --
 .../asio/detail/winrt_ssocket_service_base.hpp     |  355 --
 .../include/asio/detail/winrt_timer_scheduler.hpp  |  131 -
 .../include/asio/detail/winrt_utils.hpp            |  106 -
 .../include/asio/detail/winsock_init.hpp           |  128 -
 .../include/asio/detail/wrapped_handler.hpp        |  291 --
 .../third_party/asio-1.10.2/include/asio/error.hpp |  331 --
 .../asio-1.10.2/include/asio/error_code.hpp        |  188 --
 .../include/asio/generic/basic_endpoint.hpp        |  193 --
 .../include/asio/generic/datagram_protocol.hpp     |  123 -
 .../include/asio/generic/detail/endpoint.hpp       |  133 -
 .../include/asio/generic/detail/impl/endpoint.ipp  |  109 -
 .../include/asio/generic/raw_protocol.hpp          |  121 -
 .../include/asio/generic/seq_packet_protocol.hpp   |  122 -
 .../include/asio/generic/stream_protocol.hpp       |  127 -
 .../include/asio/handler_alloc_hook.hpp            |   81 -
 .../include/asio/handler_continuation_hook.hpp     |   54 -
 .../include/asio/handler_invoke_hook.hpp           |   85 -
 .../asio-1.10.2/include/asio/handler_type.hpp      |  112 -
 .../include/asio/high_resolution_timer.hpp         |   63 -
 .../include/asio/impl/buffered_read_stream.hpp     |  358 ---
 .../include/asio/impl/buffered_write_stream.hpp    |  338 --
 .../asio-1.10.2/include/asio/impl/connect.hpp      |  428 ---
 .../asio-1.10.2/include/asio/impl/error.ipp        |  128 -
 .../asio-1.10.2/include/asio/impl/error_code.ipp   |  128 -
 .../include/asio/impl/handler_alloc_hook.ipp       |   77 -
 .../asio-1.10.2/include/asio/impl/io_service.hpp   |  152 -
 .../asio-1.10.2/include/asio/impl/io_service.ipp   |  155 -
 .../asio-1.10.2/include/asio/impl/read.hpp         |  753 -----
 .../asio-1.10.2/include/asio/impl/read_at.hpp      |  810 -----
 .../asio-1.10.2/include/asio/impl/read_until.hpp   | 1147 -------
 .../include/asio/impl/serial_port_base.hpp         |   59 -
 .../include/asio/impl/serial_port_base.ipp         |  554 ----
 .../asio-1.10.2/include/asio/impl/spawn.hpp        |  336 --
 .../asio-1.10.2/include/asio/impl/src.cpp          |   25 -
 .../asio-1.10.2/include/asio/impl/src.hpp          |   74 -
 .../asio-1.10.2/include/asio/impl/use_future.hpp   |  172 -
 .../asio-1.10.2/include/asio/impl/write.hpp        |  765 -----
 .../asio-1.10.2/include/asio/impl/write_at.hpp     |  825 -----
 .../asio-1.10.2/include/asio/io_service.hpp        |  770 -----
 .../asio-1.10.2/include/asio/ip/address.hpp        |  200 --
 .../asio-1.10.2/include/asio/ip/address_v4.hpp     |  241 --
 .../asio-1.10.2/include/asio/ip/address_v6.hpp     |  246 --
 .../asio-1.10.2/include/asio/ip/basic_endpoint.hpp |  263 --
 .../asio-1.10.2/include/asio/ip/basic_resolver.hpp |  268 --
 .../include/asio/ip/basic_resolver_entry.hpp       |   94 -
 .../include/asio/ip/basic_resolver_iterator.hpp    |  260 --
 .../include/asio/ip/basic_resolver_query.hpp       |  244 --
 .../include/asio/ip/detail/endpoint.hpp            |  139 -
 .../include/asio/ip/detail/impl/endpoint.ipp       |  204 --
 .../include/asio/ip/detail/socket_option.hpp       |  569 ----
 .../asio-1.10.2/include/asio/ip/host_name.hpp      |   42 -
 .../asio-1.10.2/include/asio/ip/icmp.hpp           |  115 -
 .../asio-1.10.2/include/asio/ip/impl/address.hpp   |   53 -
 .../asio-1.10.2/include/asio/ip/impl/address.ipp   |  226 --
 .../include/asio/ip/impl/address_v4.hpp            |   53 -
 .../include/asio/ip/impl/address_v4.ipp            |  178 -
 .../include/asio/ip/impl/address_v6.hpp            |   53 -
 .../include/asio/ip/impl/address_v6.ipp            |  298 --
 .../include/asio/ip/impl/basic_endpoint.hpp        |   55 -
 .../asio-1.10.2/include/asio/ip/impl/host_name.ipp |   54 -
 .../asio-1.10.2/include/asio/ip/multicast.hpp      |  191 --
 .../include/asio/ip/resolver_query_base.hpp        |  130 -
 .../include/asio/ip/resolver_service.hpp           |  176 -
 .../asio-1.10.2/include/asio/ip/tcp.hpp            |  155 -
 .../asio-1.10.2/include/asio/ip/udp.hpp            |  111 -
 .../asio-1.10.2/include/asio/ip/unicast.hpp        |   70 -
 .../asio-1.10.2/include/asio/ip/v6_only.hpp        |   69 -
 .../asio-1.10.2/include/asio/is_read_buffered.hpp  |   59 -
 .../asio-1.10.2/include/asio/is_write_buffered.hpp |   59 -
 .../include/asio/local/basic_endpoint.hpp          |  239 --
 .../include/asio/local/connect_pair.hpp            |  104 -
 .../include/asio/local/datagram_protocol.hpp       |   80 -
 .../include/asio/local/detail/endpoint.hpp         |  133 -
 .../include/asio/local/detail/impl/endpoint.ipp    |  128 -
 .../include/asio/local/stream_protocol.hpp         |   90 -
 .../asio-1.10.2/include/asio/placeholders.hpp      |  123 -
 .../include/asio/posix/basic_descriptor.hpp        |  490 ---
 .../include/asio/posix/basic_stream_descriptor.hpp |  362 ---
 .../include/asio/posix/descriptor_base.hpp         |   97 -
 .../include/asio/posix/stream_descriptor.hpp       |   37 -
 .../asio/posix/stream_descriptor_service.hpp       |  260 --
 .../include/asio/raw_socket_service.hpp            |  432 ---
 .../third_party/asio-1.10.2/include/asio/read.hpp  |  631 ----
 .../asio-1.10.2/include/asio/read_at.hpp           |  664 ----
 .../asio-1.10.2/include/asio/read_until.hpp        |  923 ------
 .../include/asio/seq_packet_socket_service.hpp     |  380 ---
 .../asio-1.10.2/include/asio/serial_port.hpp       |   36 -
 .../asio-1.10.2/include/asio/serial_port_base.hpp  |  167 -
 .../include/asio/serial_port_service.hpp           |  253 --
 .../asio-1.10.2/include/asio/signal_set.hpp        |   28 -
 .../include/asio/signal_set_service.hpp            |  134 -
 .../include/asio/socket_acceptor_service.hpp       |  302 --
 .../asio-1.10.2/include/asio/socket_base.hpp       |  520 ---
 .../third_party/asio-1.10.2/include/asio/spawn.hpp |  265 --
 .../third_party/asio-1.10.2/include/asio/ssl.hpp   |   30 -
 .../asio-1.10.2/include/asio/ssl/basic_context.hpp |   40 -
 .../asio-1.10.2/include/asio/ssl/context.hpp       |  787 -----
 .../asio-1.10.2/include/asio/ssl/context_base.hpp  |  167 -
 .../include/asio/ssl/context_service.hpp           |   40 -
 .../asio/ssl/detail/buffered_handshake_op.hpp      |  110 -
 .../asio-1.10.2/include/asio/ssl/detail/engine.hpp |  164 -
 .../include/asio/ssl/detail/handshake_op.hpp       |   68 -
 .../include/asio/ssl/detail/impl/engine.ipp        |  326 --
 .../include/asio/ssl/detail/impl/openssl_init.ipp  |  145 -
 .../asio-1.10.2/include/asio/ssl/detail/io.hpp     |  347 --
 .../include/asio/ssl/detail/openssl_init.hpp       |  101 -
 .../include/asio/ssl/detail/openssl_types.hpp      |   28 -
 .../include/asio/ssl/detail/password_callback.hpp  |   72 -
 .../include/asio/ssl/detail/read_op.hpp            |   73 -
 .../include/asio/ssl/detail/shutdown_op.hpp        |   60 -
 .../include/asio/ssl/detail/stream_core.hpp        |  126 -
 .../include/asio/ssl/detail/verify_callback.hpp    |   68 -
 .../include/asio/ssl/detail/write_op.hpp           |   73 -
 .../asio-1.10.2/include/asio/ssl/error.hpp         |   68 -
 .../asio-1.10.2/include/asio/ssl/impl/context.hpp  |   71 -
 .../asio-1.10.2/include/asio/ssl/impl/context.ipp  |  950 ------
 .../asio-1.10.2/include/asio/ssl/impl/error.ipp    |   57 -
 .../include/asio/ssl/impl/rfc2818_verification.ipp |  166 -
 .../asio-1.10.2/include/asio/ssl/impl/src.hpp      |   28 -
 .../include/asio/ssl/old/basic_context.hpp         |  434 ---
 .../include/asio/ssl/old/context_service.hpp       |  174 -
 .../ssl/old/detail/openssl_context_service.hpp     |  386 ---
 .../asio/ssl/old/detail/openssl_operation.hpp      |  524 ---
 .../asio/ssl/old/detail/openssl_stream_service.hpp |  571 ----
 .../asio-1.10.2/include/asio/ssl/old/stream.hpp    |  501 ---
 .../include/asio/ssl/old/stream_service.hpp        |  184 --
 .../include/asio/ssl/rfc2818_verification.hpp      |  100 -
 .../asio-1.10.2/include/asio/ssl/stream.hpp        |  756 -----
 .../asio-1.10.2/include/asio/ssl/stream_base.hpp   |   52 -
 .../include/asio/ssl/stream_service.hpp            |   40 -
 .../include/asio/ssl/verify_context.hpp            |   73 -
 .../asio-1.10.2/include/asio/ssl/verify_mode.hpp   |   63 -
 .../asio-1.10.2/include/asio/steady_timer.hpp      |   61 -
 .../asio-1.10.2/include/asio/strand.hpp            |  251 --
 .../include/asio/stream_socket_service.hpp         |  376 ---
 .../asio-1.10.2/include/asio/streambuf.hpp         |   33 -
 .../asio-1.10.2/include/asio/system_error.hpp      |  131 -
 .../asio-1.10.2/include/asio/system_timer.hpp      |   57 -
 .../asio-1.10.2/include/asio/thread.hpp            |   92 -
 .../asio-1.10.2/include/asio/time_traits.hpp       |   96 -
 .../asio-1.10.2/include/asio/unyield.hpp           |   21 -
 .../asio-1.10.2/include/asio/use_future.hpp        |   92 -
 .../asio-1.10.2/include/asio/version.hpp           |   23 -
 .../asio-1.10.2/include/asio/wait_traits.hpp       |   41 -
 .../include/asio/waitable_timer_service.hpp        |  168 -
 .../include/asio/windows/basic_handle.hpp          |  281 --
 .../include/asio/windows/basic_object_handle.hpp   |  178 -
 .../asio/windows/basic_random_access_handle.hpp    |  376 ---
 .../include/asio/windows/basic_stream_handle.hpp   |  359 ---
 .../include/asio/windows/object_handle.hpp         |   38 -
 .../include/asio/windows/object_handle_service.hpp |  177 -
 .../include/asio/windows/overlapped_ptr.hpp        |  116 -
 .../include/asio/windows/random_access_handle.hpp  |   37 -
 .../asio/windows/random_access_handle_service.hpp  |  220 --
 .../include/asio/windows/stream_handle.hpp         |   37 -
 .../include/asio/windows/stream_handle_service.hpp |  218 --
 .../third_party/asio-1.10.2/include/asio/write.hpp |  618 ----
 .../asio-1.10.2/include/asio/write_at.hpp          |  670 ----
 .../third_party/asio-1.10.2/include/asio/yield.hpp |   23 -
 .../libhdfspp/third_party/asio-1.10.2/src/asio.cpp |   11 -
 .../third_party/asio-1.10.2/src/asio_ssl.cpp       |   11 -
 451 files changed, 326 insertions(+), 87303 deletions(-)

diff --git a/BUILDING.txt b/BUILDING.txt
index d54ce83..c96c851 100644
--- a/BUILDING.txt
+++ b/BUILDING.txt
@@ -6,6 +6,7 @@ Requirements:
 * Unix System
 * JDK 1.8
 * Maven 3.3 or later
+* Boost 1.72 (if compiling native code)
 * Protocol Buffers 3.7.1 (if compiling native code)
 * CMake 3.1 or newer (if compiling native code)
 * Zlib devel (if compiling native code)
@@ -72,6 +73,12 @@ Installing required packages for clean install of Ubuntu 14.04 LTS Desktop:
         && ./configure\
         && make install \
         && rm -rf /opt/protobuf-3.7-src
+* Boost
+  $ curl -L https://sourceforge.net/projects/boost/files/boost/1.72.0/boost_1_72_0.tar.bz2/download > boost_1_72_0.tar.bz2 \
+    && tar --bzip2 -xf boost_1_72_0.tar.bz2 \
+    && cd boost_1_72_0 \
+    && ./bootstrap.sh --prefix=/usr/ \
+    && ./b2 --without-python install
 
 Optional packages:
 
@@ -468,6 +475,7 @@ Requirements:
 * Windows System
 * JDK 1.8
 * Maven 3.0 or later
+* Boost 1.72
 * Protocol Buffers 3.7.1
 * CMake 3.1 or newer
 * Visual Studio 2010 Professional or Higher
diff --git a/dev-support/docker/Dockerfile b/dev-support/docker/Dockerfile
index fd2d293..f72fa46 100644
--- a/dev-support/docker/Dockerfile
+++ b/dev-support/docker/Dockerfile
@@ -92,6 +92,21 @@ ENV MAVEN_HOME /usr
 ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
 ENV FINDBUGS_HOME /usr
 
+#######
+# Install Boost 1.72 (1.65 ships with Bionic)
+#######
+# hadolint ignore=DL3003
+RUN mkdir -p /opt/boost-library \
+    && curl -L https://sourceforge.net/projects/boost/files/boost/1.72.0/boost_1_72_0.tar.bz2/download > boost_1_72_0.tar.bz2 \
+    && mv boost_1_72_0.tar.bz2 /opt/boost-library \
+    && cd /opt/boost-library \
+    && tar --bzip2 -xf boost_1_72_0.tar.bz2 \
+    && cd /opt/boost-library/boost_1_72_0 \
+    && ./bootstrap.sh --prefix=/usr/ \
+    && ./b2 --without-python install \
+    && cd /root \
+    && rm -rf /opt/boost-library
+
 ######
 # Install Google Protobuf 3.7.1 (3.0.0 ships with Bionic)
 ######
diff --git a/dev-support/docker/Dockerfile_aarch64 b/dev-support/docker/Dockerfile_aarch64
index ccc517d..5fd646f 100644
--- a/dev-support/docker/Dockerfile_aarch64
+++ b/dev-support/docker/Dockerfile_aarch64
@@ -95,6 +95,21 @@ ENV MAVEN_HOME /usr
 ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-arm64
 ENV FINDBUGS_HOME /usr
 
+#######
+# Install Boost 1.72 (1.65 ships with Bionic)
+#######
+# hadolint ignore=DL3003
+RUN mkdir -p /opt/boost-library \
+    && curl -L https://sourceforge.net/projects/boost/files/boost/1.72.0/boost_1_72_0.tar.bz2/download > boost_1_72_0.tar.bz2 \
+    && mv boost_1_72_0.tar.bz2 /opt/boost-library \
+    && cd /opt/boost-library \
+    && tar --bzip2 -xf boost_1_72_0.tar.bz2 \
+    && cd /opt/boost-library/boost_1_72_0 \
+    && ./bootstrap.sh --prefix=/usr/ \
+    && ./b2 --without-python install \
+    && cd /root \
+    && rm -rf /opt/boost-library
+
 ######
 # Install Google Protobuf 3.7.1 (3.0.0 ships with Bionic)
 ######
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/CMakeLists.txt b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/CMakeLists.txt
index 626c49b..6e233fd 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/CMakeLists.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/CMakeLists.txt
@@ -18,6 +18,8 @@
 
 cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
 
+project(hadoop_hdfs_native_client)
+
 enable_testing()
 
 list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/../../../hadoop-common-project/hadoop-common)
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/CMakeLists.txt b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/CMakeLists.txt
index 411320a..6a2f378 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/CMakeLists.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/CMakeLists.txt
@@ -28,6 +28,8 @@ project (libhdfspp)
 
 cmake_minimum_required(VERSION 2.8)
 
+find_package (Boost 1.72.0 REQUIRED)
+
 enable_testing()
 include (CTest)
 
@@ -220,7 +222,7 @@ include_directories(
 
 include_directories( SYSTEM
   ${PROJECT_BINARY_DIR}/lib/proto
-  third_party/asio-1.10.2/include
+  ${Boost_INCLUDE_DIRS}
   third_party/rapidxml-1.13
   third_party/gmock-1.7.0
   third_party/tr2
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/include/hdfspp/ioservice.h b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/include/hdfspp/ioservice.h
index a6ec97a..b0bac5d 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/include/hdfspp/ioservice.h
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/include/hdfspp/ioservice.h
@@ -61,10 +61,7 @@
 #include <functional>
 #include <memory>
 
-// forward decl
-namespace asio {
-  class io_service;
-}
+#include <boost/asio/io_service.hpp>
 
 namespace hdfs {
 
@@ -133,7 +130,7 @@ class IoService : public std::enable_shared_from_this<IoService>
    * Access underlying io_service object.  Only to be used in asio library calls.
    * After HDFS-11884 is complete only tests should need direct access to the asio::io_service.
    **/
-  virtual asio::io_service& GetRaw() = 0;
+  virtual boost::asio::io_service& GetRaw() = 0;
 };
 
 
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/CMakeLists.txt b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/CMakeLists.txt
index 1ab04d3..87779e7 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/CMakeLists.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/CMakeLists.txt
@@ -19,6 +19,7 @@ if(NEED_LINK_DL)
    set(LIB_DL dl)
 endif()
 
+include_directories(${Boost_INCLUDE_DIRS} ../../include)
 add_library(common_obj OBJECT status.cc sasl_digest_md5.cc ioservice_impl.cc options.cc configuration.cc configuration_loader.cc hdfs_configuration.cc uri.cc util.cc retry_policy.cc cancel_tracker.cc logging.cc libhdfs_events_impl.cc auth_info.cc namenode_info.cc statinfo.cc fsinfo.cc content_summary.cc locks.cc config_parser.cc)
 add_library(common $<TARGET_OBJECTS:common_obj> $<TARGET_OBJECTS:uriparser2_obj>)
 target_link_libraries(common ${LIB_DL})
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/async_stream.h b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/async_stream.h
index efe2e1c..e9779e7 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/async_stream.h
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/async_stream.h
@@ -19,15 +19,17 @@
 #ifndef LIB_COMMON_ASYNC_STREAM_H_
 #define LIB_COMMON_ASYNC_STREAM_H_
 
-#include <asio/buffer.hpp>
-#include <asio/error_code.hpp>
+#include <boost/asio/buffer.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/asio/system_executor.hpp>
+
 #include <functional>
 
 namespace hdfs {
 
 // Contiguous buffer types
-typedef asio::mutable_buffers_1 MutableBuffer;
-typedef asio::const_buffers_1   ConstBuffer;
+typedef boost::asio::mutable_buffers_1 MutableBuffer;
+typedef boost::asio::const_buffers_1   ConstBuffer;
 
 /*
  * asio-compatible stream implementation.
@@ -38,13 +40,20 @@ typedef asio::const_buffers_1   ConstBuffer;
  */
 class AsyncStream  {
 public:
+  using executor_type = boost::asio::system_executor;
+  executor_type executor_;
+
   virtual void async_read_some(const MutableBuffer &buf,
-          std::function<void (const asio::error_code & error,
+          std::function<void (const boost::system::error_code & error,
                                  std::size_t bytes_transferred) > handler) = 0;
 
   virtual void async_write_some(const ConstBuffer &buf,
-            std::function<void (const asio::error_code & error,
+            std::function<void (const boost::system::error_code & error,
                                  std::size_t bytes_transferred) > handler) = 0;
+
+  executor_type get_executor() {
+      return executor_;
+  }
 };
 
 }
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/continuation/asio.h b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/continuation/asio.h
index 0215176..f2a3722 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/continuation/asio.h
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/continuation/asio.h
@@ -21,7 +21,10 @@
 #include "continuation.h"
 #include "common/util.h"
 #include "hdfspp/status.h"
-#include <asio/write.hpp>
+
+#include <boost/asio/write.hpp>
+#include <boost/system/error_code.hpp>
+
 #include <memory>
 
 namespace hdfs {
@@ -37,8 +40,8 @@ public:
 
   virtual void Run(const Next &next) override {
     auto handler =
-        [next](const asio::error_code &ec, size_t) { next(ToStatus(ec)); };
-    asio::async_write(*stream_, buffer_, handler);
+        [next](const boost::system::error_code &ec, size_t) { next(ToStatus(ec)); };
+    boost::asio::async_write(*stream_, buffer_, handler);
   }
 
 private:
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/continuation/protobuf.h b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/continuation/protobuf.h
index 21e063e..e5be85a 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/continuation/protobuf.h
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/continuation/protobuf.h
@@ -20,8 +20,10 @@
 
 #include "common/util.h"
 
-#include <asio/read.hpp>
-
+#include <boost/asio/read.hpp>
+#include <boost/asio/write.hpp>
+#include <boost/asio/buffer.hpp>
+#include <boost/system/error_code.hpp>
 #include <google/protobuf/message_lite.h>
 #include <google/protobuf/io/coded_stream.h>
 #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
@@ -39,7 +41,7 @@ struct ReadDelimitedPBMessageContinuation : public Continuation {
 
   virtual void Run(const Next &next) override {
     namespace pbio = google::protobuf::io;
-    auto handler = [this, next](const asio::error_code &ec, size_t) {
+    auto handler = [this, next](const boost::system::error_code &ec, size_t) {
       Status status;
       if (ec) {
         status = ToStatus(ec);
@@ -57,15 +59,15 @@ struct ReadDelimitedPBMessageContinuation : public Continuation {
       }
       next(status);
     };
-    asio::async_read(*stream_,
-        asio::buffer(buf_),
+    boost::asio::async_read(*stream_,
+        boost::asio::buffer(buf_),
         std::bind(&ReadDelimitedPBMessageContinuation::CompletionHandler, this,
                   std::placeholders::_1, std::placeholders::_2),
         handler);
   }
 
 private:
-  size_t CompletionHandler(const asio::error_code &ec, size_t transferred) {
+  size_t CompletionHandler(const boost::system::error_code &ec, size_t transferred) {
     if (ec) {
       return 0;
     }
@@ -103,7 +105,7 @@ struct WriteDelimitedPBMessageContinuation : Continuation {
       return;
     }
 
-    asio::async_write(*stream_, asio::buffer(buf_), [next](const asio::error_code &ec, size_t) { next(ToStatus(ec)); } );
+    boost::asio::async_write(*stream_, boost::asio::buffer(buf_), [next](const boost::system::error_code &ec, size_t) { next(ToStatus(ec)); } );
   }
 
 private:
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/fsinfo.cc b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/fsinfo.cc
index 9f350a8..f8f5923 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/fsinfo.cc
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/fsinfo.cc
@@ -17,6 +17,8 @@
  */
 
 #include <hdfspp/fsinfo.h>
+
+#include <algorithm>
 #include <sstream>
 #include <iomanip>
 
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/ioservice_impl.cc b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/ioservice_impl.cc
index de081ed..17a4474 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/ioservice_impl.cc
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/ioservice_impl.cc
@@ -125,7 +125,7 @@ void IoServiceImpl::Run() {
   // from escaping this library and crashing the process.
 
   // As recommended in http://www.boost.org/doc/libs/1_39_0/doc/html/boost_asio/reference/io_service.html#boost_asio.reference.io_service.effect_of_exceptions_thrown_from_handlers
-  asio::io_service::work work(io_service_);
+  boost::asio::io_service::work work(io_service_);
   while(true)
   {
     try
@@ -145,7 +145,7 @@ void IoServiceImpl::Stop() {
   io_service_.stop();
 }
 
-asio::io_service& IoServiceImpl::GetRaw() {
+boost::asio::io_service& IoServiceImpl::GetRaw() {
   return io_service_;
 }
 
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/ioservice_impl.h b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/ioservice_impl.h
index a29985c..2d627aa 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/ioservice_impl.h
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/ioservice_impl.h
@@ -21,7 +21,7 @@
 
 #include "hdfspp/ioservice.h"
 
-#include <asio/io_service.hpp>
+#include <boost/asio/io_service.hpp>
 #include "common/new_delete.h"
 
 #include <mutex>
@@ -45,7 +45,7 @@ class IoServiceImpl : public IoService {
   void PostTask(std::function<void(void)> asyncTask) override;
   void Run() override;
   void Stop() override;
-  asio::io_service& GetRaw() override;
+  boost::asio::io_service& GetRaw() override;
 
   // Add a single worker thread, in the common case try to avoid this in favor
   // of Init[Default]Workers. Public for use by tests and rare cases where a
@@ -57,7 +57,7 @@ class IoServiceImpl : public IoService {
 
  private:
   std::mutex state_lock_;
-  ::asio::io_service io_service_;
+  boost::asio::io_service io_service_;
 
   // For doing logging + resource manager updates on thread start/exit
   void ThreadStartHook();
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/logging.cc b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/logging.cc
index 94bce83..54048fb 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/logging.cc
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/logging.cc
@@ -136,7 +136,7 @@ LogMessage& LogMessage::operator<<(const std::string& str) {
   return *this;
 }
 
-LogMessage& LogMessage::operator<<(const ::asio::ip::tcp::endpoint& endpoint) {
+LogMessage& LogMessage::operator<<(const boost::asio::ip::tcp::endpoint& endpoint) {
   msg_buffer_ << endpoint;
   return *this;
 }
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/logging.h b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/logging.h
index 4e66a93..8935287 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/logging.h
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/logging.h
@@ -19,7 +19,7 @@
 #ifndef LIB_COMMON_LOGGING_H_
 #define LIB_COMMON_LOGGING_H_
 
-#include <asio/ip/tcp.hpp>
+#include <boost/asio/ip/tcp.hpp>
 
 #include "hdfspp/log.h"
 
@@ -193,7 +193,7 @@ class LogMessage {
   LogMessage& operator<<(void *);
 
   //asio types
-  LogMessage& operator<<(const ::asio::ip::tcp::endpoint& endpoint);
+  LogMessage& operator<<(const boost::asio::ip::tcp::endpoint& endpoint);
 
   //thread and mutex types
   LogMessage& operator<<(const std::thread::id& tid);
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/namenode_info.cc b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/namenode_info.cc
index a04daf1..92054fc 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/namenode_info.cc
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/namenode_info.cc
@@ -70,7 +70,7 @@ bool ResolveInPlace(std::shared_ptr<IoService> ioservice, ResolvedNamenodeInfo &
   return true;
 }
 
-typedef std::vector<asio::ip::tcp::endpoint> endpoint_vector;
+typedef std::vector<boost::asio::ip::tcp::endpoint> endpoint_vector;
 
 // RAII wrapper
 class ScopedResolver {
@@ -78,8 +78,8 @@ class ScopedResolver {
   std::shared_ptr<IoService> io_service_;
   std::string host_;
   std::string port_;
-  ::asio::ip::tcp::resolver::query query_;
-  ::asio::ip::tcp::resolver resolver_;
+  boost::asio::ip::tcp::resolver::query query_;
+  boost::asio::ip::tcp::resolver resolver_;
   endpoint_vector endpoints_;
 
   // Caller blocks on access if resolution isn't finished
@@ -111,9 +111,9 @@ class ScopedResolver {
     std::shared_ptr<std::promise<Status>> shared_result = result_status_;
 
     // Callback to pull a copy of endpoints out of resolver and set promise
-    auto callback = [this, shared_result](const asio::error_code &ec, ::asio::ip::tcp::resolver::iterator out) {
+    auto callback = [this, shared_result](const boost::system::error_code &ec, boost::asio::ip::tcp::resolver::iterator out) {
       if(!ec) {
-        std::copy(out, ::asio::ip::tcp::resolver::iterator(), std::back_inserter(endpoints_));
+        std::copy(out, boost::asio::ip::tcp::resolver::iterator(), std::back_inserter(endpoints_));
       }
       shared_result->set_value( ToStatus(ec) );
     };
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/namenode_info.h b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/namenode_info.h
index f43690d..0532376 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/namenode_info.h
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/namenode_info.h
@@ -19,7 +19,7 @@
 #ifndef COMMON_HDFS_NAMENODE_INFO_H_
 #define COMMON_HDFS_NAMENODE_INFO_H_
 
-#include <asio.hpp>
+#include <boost/asio/ip/tcp.hpp>
 
 #include <hdfspp/options.h>
 
@@ -37,7 +37,7 @@ struct ResolvedNamenodeInfo : public NamenodeInfo {
   ResolvedNamenodeInfo& operator=(const NamenodeInfo &info);
   std::string str() const;
 
-  std::vector<::asio::ip::tcp::endpoint> endpoints;
+  std::vector<boost::asio::ip::tcp::endpoint> endpoints;
 };
 
 // Clear endpoints if set and resolve all of them in parallel.
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/retry_policy.cc b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/retry_policy.cc
index dca49fb..eb64829 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/retry_policy.cc
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/retry_policy.cc
@@ -19,6 +19,8 @@
 #include "common/retry_policy.h"
 #include "common/logging.h"
 
+#include <boost/asio/error.hpp>
+
 #include <sstream>
 
 namespace hdfs {
@@ -57,7 +59,7 @@ RetryAction FixedDelayWithFailover::ShouldRetry(const Status &s, uint64_t retrie
   (void)max_failover_conn_retries_;
   LOG_TRACE(kRPC, << "FixedDelayWithFailover::ShouldRetry(retries=" << retries << ", failovers=" << failovers << ")");
 
-  if(failovers < max_failover_retries_ && (s.code() == ::asio::error::timed_out || s.get_server_exception_type() == Status::kStandbyException) )
+  if(failovers < max_failover_retries_ && (s.code() == boost::asio::error::timed_out || s.get_server_exception_type() == Status::kStandbyException) )
   {
     // Try connecting to another NN in case this one keeps timing out
     // Can add the backoff wait specified by dfs.client.failover.sleep.base.millis here
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/util.cc b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/util.cc
index 6a07987..7a4b4cf 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/util.cc
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/util.cc
@@ -30,7 +30,7 @@
 
 namespace hdfs {
 
-Status ToStatus(const ::asio::error_code &ec) {
+Status ToStatus(const boost::system::error_code &ec) {
   if (ec) {
     return Status(ec.value(), ec.message().c_str());
   } else {
@@ -134,7 +134,7 @@ std::string Base64Encode(const std::string &src) {
 }
 
 
-std::string SafeDisconnect(asio::ip::tcp::socket *sock) {
+std::string SafeDisconnect(boost::asio::ip::tcp::socket *sock) {
   std::string err;
   if(sock && sock->is_open()) {
     /**
@@ -147,7 +147,7 @@ std::string SafeDisconnect(asio::ip::tcp::socket *sock) {
      **/
 
     try {
-      sock->shutdown(asio::ip::tcp::socket::shutdown_both);
+      sock->shutdown(boost::asio::ip::tcp::socket::shutdown_both);
     } catch (const std::exception &e) {
       err = std::string("shutdown() threw") + e.what();
     }
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/util.h b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/util.h
index 590ba54..a7f4f95 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/util.h
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/util.h
@@ -24,7 +24,8 @@
 #include <mutex>
 #include <string>
 
-#include <asio/error_code.hpp>
+#include <boost/asio/ip/tcp.hpp>
+#include <boost/system/error_code.hpp>
 #include <openssl/rand.h>
 #include <google/protobuf/io/coded_stream.h>
 
@@ -41,7 +42,7 @@ namespace hdfs {
 typedef std::lock_guard<std::mutex> mutex_guard;
 
 
-Status ToStatus(const ::asio::error_code &ec);
+Status ToStatus(const boost::system::error_code &ec);
 
 // Determine size of buffer that needs to be allocated in order to serialize msg
 // in delimited format
@@ -75,7 +76,7 @@ bool lock_held(T & mutex) {
 // Shutdown and close a socket safely; will check if the socket is open and
 // catch anything thrown by asio.
 // Returns a string containing error message on failure, otherwise an empty string.
-std::string SafeDisconnect(asio::ip::tcp::socket *sock);
+std::string SafeDisconnect(boost::asio::ip::tcp::socket *sock);
 
 
 // The following helper function is used for classes that look like the following:
@@ -94,13 +95,13 @@ std::string SafeDisconnect(asio::ip::tcp::socket *sock);
 // it's a asio socket, and nullptr if it's anything else.
 
 template <typename sock_t>
-inline asio::ip::tcp::socket *get_asio_socket_ptr(sock_t *s) {
+inline boost::asio::ip::tcp::socket *get_asio_socket_ptr(sock_t *s) {
   (void)s;
   return nullptr;
 }
 template<>
-inline asio::ip::tcp::socket *get_asio_socket_ptr<asio::ip::tcp::socket>
-                                            (asio::ip::tcp::socket *s) {
+inline boost::asio::ip::tcp::socket *get_asio_socket_ptr<boost::asio::ip::tcp::socket>
+                                            (boost::asio::ip::tcp::socket *s) {
   return s;
 }
 
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/connection/datanodeconnection.cc b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/connection/datanodeconnection.cc
index 4142482..61df6d7 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/connection/datanodeconnection.cc
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/connection/datanodeconnection.cc
@@ -19,6 +19,8 @@
 #include "datanodeconnection.h"
 #include "common/util.h"
 
+#include <boost/asio/connect.hpp>
+
 namespace hdfs {
 
 DataNodeConnection::~DataNodeConnection(){}
@@ -29,7 +31,7 @@ DataNodeConnectionImpl::DataNodeConnectionImpl(std::shared_ptr<IoService> io_ser
                                                const hadoop::common::TokenProto *token,
                                                LibhdfsEvents *event_handlers) : event_handlers_(event_handlers)
 {
-  using namespace ::asio::ip;
+  using namespace boost::asio::ip;
 
   conn_.reset(new tcp::socket(io_service->GetRaw()));
   auto datanode_addr = dn_proto.id();
@@ -49,8 +51,8 @@ void DataNodeConnectionImpl::Connect(
   // Keep the DN from being freed until we're done
   mutex_guard state_lock(state_lock_);
   auto shared_this = shared_from_this();
-  asio::async_connect(*conn_, endpoints_.begin(), endpoints_.end(),
-          [shared_this, handler](const asio::error_code &ec, std::array<asio::ip::tcp::endpoint, 1>::iterator it) {
+  boost::asio::async_connect(*conn_, endpoints_.begin(), endpoints_.end(),
+          [shared_this, handler](const boost::system::error_code &ec, std::array<boost::asio::ip::tcp::endpoint, 1>::iterator it) {
             (void)it;
             handler(ToStatus(ec), shared_this); });
 }
@@ -69,7 +71,7 @@ void DataNodeConnectionImpl::Cancel() {
 }
 
 void DataNodeConnectionImpl::async_read_some(const MutableBuffer &buf,
-             std::function<void (const asio::error_code & error, std::size_t bytes_transferred) > handler)
+             std::function<void (const boost::system::error_code & error, std::size_t bytes_transferred) > handler)
 {
   event_handlers_->call("DN_read_req", "", "", buf.end() - buf.begin());
 
@@ -78,7 +80,7 @@ void DataNodeConnectionImpl::async_read_some(const MutableBuffer &buf,
 }
 
 void DataNodeConnectionImpl::async_write_some(const ConstBuffer &buf,
-             std::function<void (const asio::error_code & error, std::size_t bytes_transferred) > handler)
+             std::function<void (const boost::system::error_code & error, std::size_t bytes_transferred) > handler)
 {
   event_handlers_->call("DN_write_req", "", "", buf.end() - buf.begin());
 
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/connection/datanodeconnection.h b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/connection/datanodeconnection.h
index a54338f..a0cb8375a 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/connection/datanodeconnection.h
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/connection/datanodeconnection.h
@@ -26,7 +26,8 @@
 #include "common/util.h"
 #include "common/new_delete.h"
 
-#include "asio.hpp"
+#include <boost/asio/ip/tcp.hpp>
+#include <boost/system/error_code.hpp>
 
 namespace hdfs {
 
@@ -43,7 +44,7 @@ public:
 
 
 struct SocketDeleter {
-  inline void operator()(asio::ip::tcp::socket *sock) {
+inline void operator()(boost::asio::ip::tcp::socket* sock) {
     // Cancel may have already closed the socket.
     std::string err = SafeDisconnect(sock);
     if(!err.empty()) {
@@ -59,8 +60,8 @@ private:
   std::mutex state_lock_;
 public:
   MEMCHECKED_CLASS(DataNodeConnectionImpl)
-  std::unique_ptr<asio::ip::tcp::socket, SocketDeleter> conn_;
-  std::array<asio::ip::tcp::endpoint, 1> endpoints_;
+  std::unique_ptr<boost::asio::ip::tcp::socket, SocketDeleter> conn_;
+  std::array<boost::asio::ip::tcp::endpoint, 1> endpoints_;
   std::string uuid_;
   LibhdfsEvents *event_handlers_;
 
@@ -74,10 +75,10 @@ public:
   void Cancel() override;
 
   void async_read_some(const MutableBuffer &buf,
-                       std::function<void (const asio::error_code & error, std::size_t bytes_transferred) > handler) override;
+                       std::function<void (const boost::system::error_code & error, std::size_t bytes_transferred) > handler) override;
 
   void async_write_some(const ConstBuffer &buf,
-                        std::function<void (const asio::error_code & error, std::size_t bytes_transferred) > handler) override;
+                        std::function<void (const boost::system::error_code & error, std::size_t bytes_transferred) > handler) override;
 };
 
 }
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filehandle.cc b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filehandle.cc
index 02630fb..169def3 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filehandle.cc
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filehandle.cc
@@ -26,6 +26,8 @@
 #include <future>
 #include <tuple>
 
+#include <boost/asio/buffer.hpp>
+
 #define FMT_THIS_ADDR "this=" << (void*)this
 
 namespace hdfs {
@@ -72,7 +74,7 @@ void FileHandleImpl::PositionRead(
     handler(status, bytes_read);
   };
 
-  AsyncPreadSome(offset, asio::buffer(buf, buf_size), bad_node_tracker_, callback);
+  AsyncPreadSome(offset, boost::asio::buffer(buf, buf_size), bad_node_tracker_, callback);
 }
 
 Status FileHandleImpl::PositionRead(void *buf, size_t buf_size, off_t offset, size_t *bytes_read) {
@@ -233,7 +235,7 @@ void FileHandleImpl::AsyncPreadSome(
 
   uint64_t offset_within_block = offset - block->offset();
   uint64_t size_within_block = std::min<uint64_t>(
-      block->b().numbytes() - offset_within_block, asio::buffer_size(buffer));
+      block->b().numbytes() - offset_within_block, boost::asio::buffer_size(buffer));
 
   LOG_DEBUG(kFileHandle, << "FileHandleImpl::AsyncPreadSome("
             << FMT_THIS_ADDR << "), ...) Datanode hostname=" << dnHostName << ", IP Address=" << dnIpAddr
@@ -281,7 +283,7 @@ void FileHandleImpl::AsyncPreadSome(
     if (status.ok()) {
       reader->AsyncReadBlock(
           client_name, *block, offset_within_block,
-          asio::buffer(buffer, size_within_block), read_handler);
+          boost::asio::buffer(buffer, size_within_block), read_handler);
     } else {
       handler(status, dn_id, 0);
     }
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filesystem.cc b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filesystem.cc
index 41cc645..ba75e86 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filesystem.cc
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filesystem.cc
@@ -29,6 +29,8 @@
 #include <pwd.h>
 #include <fnmatch.h>
 
+#include <boost/asio/ip/tcp.hpp>
+
 #define FMT_THIS_ADDR "this=" << (void*)this
 
 namespace hdfs {
@@ -36,7 +38,7 @@ namespace hdfs {
 static const char kNamenodeProtocol[] = "org.apache.hadoop.hdfs.protocol.ClientProtocol";
 static const int kNamenodeProtocolVersion = 1;
 
-using ::asio::ip::tcp;
+using boost::asio::ip::tcp;
 
 static constexpr uint16_t kDefaultPort = 8020;
 
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/namenode_operations.cc b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/namenode_operations.cc
index e46faad..96744e5 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/namenode_operations.cc
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/namenode_operations.cc
@@ -19,7 +19,7 @@
 #include "filesystem.h"
 #include "common/continuation/asio.h"
 
-#include <asio/ip/tcp.hpp>
+#include <boost/asio/ip/tcp.hpp>
 
 #include <functional>
 #include <limits>
@@ -31,7 +31,7 @@
 
 #define FMT_THIS_ADDR "this=" << (void*)this
 
-using ::asio::ip::tcp;
+using boost::asio::ip::tcp;
 
 namespace hdfs {
 
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/reader/block_reader.cc b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/reader/block_reader.cc
index 90c02f7..acecfce 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/reader/block_reader.cc
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/reader/block_reader.cc
@@ -24,6 +24,10 @@
 
 #include <future>
 
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/read.hpp>
+#include <boost/asio/completion_condition.hpp>
+
 namespace hdfs {
 
 #define FMT_CONT_AND_PARENT_ADDR "this=" << (void*)this << ", parent=" << (void*)parent_
@@ -113,7 +117,7 @@ void BlockReaderImpl::AsyncRequestBlock(const std::string &client_name,
   auto read_pb_message =
       new continuation::ReadDelimitedPBMessageContinuation<AsyncStream, 16384>(dn_, &s->response);
 
-  m->Push(asio_continuation::Write(dn_, asio::buffer(s->header))).Push(read_pb_message);
+  m->Push(asio_continuation::Write(dn_, boost::asio::buffer(s->header))).Push(read_pb_message);
 
   m->Run([this, handler, offset](const Status &status, const State &s) {    Status stat = status;
     if (stat.ok()) {
@@ -167,7 +171,7 @@ struct BlockReaderImpl::ReadPacketHeader : continuation::Continuation
 
     parent_->packet_data_read_bytes_ = 0;
     parent_->packet_len_ = 0;
-    auto handler = [next, this](const asio::error_code &ec, size_t) {
+    auto handler = [next, this](const boost::system::error_code &ec, size_t) {
       Status status;
       if (ec) {
         status = Status(ec.value(), ec.message().c_str());
@@ -191,7 +195,7 @@ struct BlockReaderImpl::ReadPacketHeader : continuation::Continuation
       next(status);
     };
 
-    asio::async_read(*parent_->dn_, asio::buffer(buf_),
+    boost::asio::async_read(*parent_->dn_, boost::asio::buffer(buf_),
                      std::bind(&ReadPacketHeader::CompletionHandler, this,
                                std::placeholders::_1, std::placeholders::_2), handler);
   }
@@ -215,7 +219,7 @@ private:
     return ntohs(*reinterpret_cast<const short *>(&buf_[kHeaderLenOffset]));
   }
 
-  size_t CompletionHandler(const asio::error_code &ec, size_t transferred) {
+  size_t CompletionHandler(const boost::system::error_code &ec, size_t transferred) {
     if (ec) {
       return 0;
     } else if (transferred < kHeaderStart) {
@@ -245,7 +249,7 @@ struct BlockReaderImpl::ReadChecksum : continuation::Continuation
 
     std::shared_ptr<DataNodeConnection> keep_conn_alive_ = shared_conn_;
 
-    auto handler = [parent, next, this, keep_conn_alive_](const asio::error_code &ec, size_t)
+    auto handler = [parent, next, this, keep_conn_alive_](const boost::system::error_code &ec, size_t)
     {
       Status status;
       if (ec) {
@@ -266,7 +270,7 @@ struct BlockReaderImpl::ReadChecksum : continuation::Continuation
 
     parent->checksum_.resize(parent->packet_len_ - sizeof(int) - parent->header_.datalen());
 
-    asio::async_read(*parent->dn_, asio::buffer(parent->checksum_), handler);
+    boost::asio::async_read(*parent->dn_, boost::asio::buffer(parent->checksum_), handler);
   }
 
 private:
@@ -279,8 +283,8 @@ private:
 struct BlockReaderImpl::ReadData : continuation::Continuation
 {
   ReadData(BlockReaderImpl *parent, std::shared_ptr<size_t> bytes_transferred,
-        const asio::mutable_buffers_1 &buf) : parent_(parent),
-        bytes_transferred_(bytes_transferred), buf_(buf), shared_conn_(parent->dn_)
+        const boost::asio::mutable_buffers_1 &buf) : parent_(parent),
+                                                     bytes_transferred_(bytes_transferred), buf_(buf), shared_conn_(parent->dn_)
   {
     buf_.begin();
   }
@@ -293,7 +297,7 @@ struct BlockReaderImpl::ReadData : continuation::Continuation
     LOG_TRACE(kBlockReader, << "BlockReaderImpl::ReadData::Run("
                             << FMT_CONT_AND_PARENT_ADDR << ") called");
     auto handler =
-        [next, this](const asio::error_code &ec, size_t transferred) {
+        [next, this](const boost::system::error_code &ec, size_t transferred) {
           Status status;
           if (ec) {
             status = Status(ec.value(), ec.message().c_str());
@@ -320,13 +324,13 @@ struct BlockReaderImpl::ReadData : continuation::Continuation
 
     auto data_len = parent_->header_.datalen() - parent_->packet_data_read_bytes_;
 
-    asio::async_read(*parent_->dn_, buf_, asio::transfer_exactly(data_len), handler);
+    boost::asio::async_read(*parent_->dn_, buf_, boost::asio::transfer_exactly(data_len), handler);
   }
 
 private:
   BlockReaderImpl *parent_;
   std::shared_ptr<size_t> bytes_transferred_;
-  const asio::mutable_buffers_1 buf_;
+  const boost::asio::mutable_buffers_1 buf_;
 
   // Keep DNConnection alive.
   std::shared_ptr<DataNodeConnection> shared_conn_;
@@ -337,7 +341,7 @@ struct BlockReaderImpl::ReadPadding : continuation::Continuation
   ReadPadding(BlockReaderImpl *parent) : parent_(parent),
         padding_(parent->chunk_padding_bytes_),
         bytes_transferred_(std::make_shared<size_t>(0)),
-        read_data_(new ReadData(parent, bytes_transferred_, asio::buffer(padding_))),
+        read_data_(new ReadData(parent, bytes_transferred_, boost::asio::buffer(padding_))),
         shared_conn_(parent->dn_) {}
 
   virtual void Run(const Next &next) override {
@@ -505,7 +509,7 @@ private:
 struct BlockReaderImpl::ReadBlockContinuation : continuation::Continuation
 {
   ReadBlockContinuation(BlockReader *reader, MutableBuffer buffer, size_t *transferred)
-      : reader_(reader), buffer_(buffer), buffer_size_(asio::buffer_size(buffer)), transferred_(transferred) {}
+      : reader_(reader), buffer_(buffer), buffer_size_(boost::asio::buffer_size(buffer)), transferred_(transferred) {}
 
   virtual void Run(const Next &next) override {
     LOG_TRACE(kBlockReader, << "BlockReaderImpl::ReadBlockContinuation::Run("
@@ -532,7 +536,7 @@ private:
       next_(status);
     } else {
       reader_->AsyncReadPacket(
-          asio::buffer(buffer_ + *transferred_, buffer_size_ - *transferred_),
+          boost::asio::buffer(buffer_ + *transferred_, buffer_size_ - *transferred_),
           std::bind(&ReadBlockContinuation::OnReadData, this, _1, _2));
     }
   }
@@ -551,7 +555,7 @@ void BlockReaderImpl::AsyncReadBlock(
   auto m = continuation::Pipeline<size_t>::Create(cancel_state_);
   size_t * bytesTransferred = &m->state();
 
-  size_t size = asio::buffer_size(buffer);
+  size_t size = boost::asio::buffer_size(buffer);
 
   m->Push(new RequestBlockContinuation(this, client_name, &block.b(), size, offset))
     .Push(new ReadBlockContinuation(this, buffer, bytesTransferred));
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/reader/datatransfer.h b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/reader/datatransfer.h
index ea17653..cfa94be 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/reader/datatransfer.h
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/reader/datatransfer.h
@@ -21,8 +21,10 @@
 #include "common/sasl_authenticator.h"
 #include "common/async_stream.h"
 #include "connection/datanodeconnection.h"
+
 #include <memory>
 
+#include <boost/system/error_code.hpp>
 
 namespace hdfs {
 
@@ -45,13 +47,13 @@ public:
   template <class Handler> void Handshake(const Handler &next);
 
   void async_read_some(const MutableBuffer &buf,
-          std::function<void (const asio::error_code & error,
+          std::function<void (const boost::system::error_code & error,
                                  std::size_t bytes_transferred) > handler) override {
     stream_->async_read_some(buf, handler);
   }
 
   void async_write_some(const ConstBuffer &buf,
-            std::function<void (const asio::error_code & error,
+            std::function<void (const boost::system::error_code & error,
                                  std::size_t bytes_transferred) > handler) override {
     stream_->async_write_some(buf, handler);
   }
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/reader/datatransfer_impl.h b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/reader/datatransfer_impl.h
index 77e618d..d77685d 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/reader/datatransfer_impl.h
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/reader/datatransfer_impl.h
@@ -23,8 +23,8 @@
 #include "common/continuation/asio.h"
 #include "common/continuation/protobuf.h"
 
-#include <asio/read.hpp>
-#include <asio/buffer.hpp>
+#include <boost/asio/read.hpp>
+#include <boost/asio/buffer.hpp>
 
 namespace hdfs {
 
@@ -101,7 +101,7 @@ void DataTransferSaslStream<Stream>::Handshake(const Handler &next) {
   using ::hdfs::continuation::WriteDelimitedPBMessage;
 
   static const int kMagicNumber = htonl(kDataTransferSasl);
-  static const asio::const_buffers_1 kMagicNumberBuffer = asio::buffer(
+  static const boost::asio::const_buffers_1 kMagicNumberBuffer = boost::asio::buffer(
       reinterpret_cast<const char *>(kMagicNumber), sizeof(kMagicNumber));
 
   struct State {
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/namenode_tracker.cc b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/namenode_tracker.cc
index 242c6ea..acb754e 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/namenode_tracker.cc
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/namenode_tracker.cc
@@ -24,7 +24,7 @@
 
 namespace hdfs {
 
-static std::string format_endpoints(const std::vector<::asio::ip::tcp::endpoint> &pts) {
+static std::string format_endpoints(const std::vector<boost::asio::ip::tcp::endpoint> &pts) {
   std::stringstream ss;
   for(unsigned int i=0; i<pts.size(); i++)
     if(i == pts.size() - 1)
@@ -66,7 +66,7 @@ HANamenodeTracker::HANamenodeTracker(const std::vector<ResolvedNamenodeInfo> &se
 
 HANamenodeTracker::~HANamenodeTracker() {}
 
-bool HANamenodeTracker::GetFailoverAndUpdate(const std::vector<::asio::ip::tcp::endpoint>& current_endpoints,
+bool HANamenodeTracker::GetFailoverAndUpdate(const std::vector<boost::asio::ip::tcp::endpoint>& current_endpoints,
                                              ResolvedNamenodeInfo& out)
 {
   mutex_guard swap_lock(swap_lock_);
@@ -117,7 +117,7 @@ bool HANamenodeTracker::GetFailoverAndUpdate(const std::vector<::asio::ip::tcp::
 }
 
 
-bool HANamenodeTracker::IsCurrentActive_locked(const ::asio::ip::tcp::endpoint &ep) const {
+bool HANamenodeTracker::IsCurrentActive_locked(const boost::asio::ip::tcp::endpoint &ep) const {
   for(unsigned int i=0;i<active_info_.endpoints.size();i++) {
     if(ep.address() == active_info_.endpoints[i].address()) {
       if(ep.port() != active_info_.endpoints[i].port())
@@ -128,7 +128,7 @@ bool HANamenodeTracker::IsCurrentActive_locked(const ::asio::ip::tcp::endpoint &
   return false;
 }
 
-bool HANamenodeTracker::IsCurrentStandby_locked(const ::asio::ip::tcp::endpoint &ep) const {
+bool HANamenodeTracker::IsCurrentStandby_locked(const boost::asio::ip::tcp::endpoint &ep) const {
   for(unsigned int i=0;i<standby_info_.endpoints.size();i++) {
     if(ep.address() == standby_info_.endpoints[i].address()) {
       if(ep.port() != standby_info_.endpoints[i].port())
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/namenode_tracker.h b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/namenode_tracker.h
index 032b1d9..dedfe54 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/namenode_tracker.h
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/namenode_tracker.h
@@ -22,7 +22,7 @@
 #include "common/libhdfs_events_impl.h"
 #include "common/namenode_info.h"
 
-#include <asio/ip/tcp.hpp>
+#include <boost/asio/ip/tcp.hpp>
 
 #include <memory>
 #include <mutex>
@@ -52,13 +52,13 @@ class HANamenodeTracker {
   // currently being used.  Swap internal state and set out to other node.
   // Note: This will always mutate internal state.  Use IsCurrentActive/Standby to
   // get info without changing state
-  bool GetFailoverAndUpdate(const std::vector<::asio::ip::tcp::endpoint>& current_endpoints,
+  bool GetFailoverAndUpdate(const std::vector<boost::asio::ip::tcp::endpoint>& current_endpoints,
                             ResolvedNamenodeInfo& out);
 
  private:
   // See if endpoint ep is part of the list of endpoints for the active or standby NN
-  bool IsCurrentActive_locked(const ::asio::ip::tcp::endpoint &ep) const;
-  bool IsCurrentStandby_locked(const ::asio::ip::tcp::endpoint &ep) const;
+  bool IsCurrentActive_locked(const boost::asio::ip::tcp::endpoint &ep) const;
+  bool IsCurrentStandby_locked(const boost::asio::ip::tcp::endpoint &ep) const;
 
   // If HA should be enabled, according to our options and runtime info like # nodes provided
   bool enabled_;
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/request.h b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/request.h
index f195540..0e19fff 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/request.h
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/request.h
@@ -29,7 +29,7 @@
 #include <google/protobuf/io/coded_stream.h>
 #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
 
-#include <asio/deadline_timer.hpp>
+#include <boost/asio/deadline_timer.hpp>
 
 
 namespace hdfs {
@@ -59,7 +59,7 @@ class Request {
 
   int call_id() const { return call_id_; }
   std::string  method_name() const { return method_name_; }
-  ::asio::deadline_timer &timer() { return timer_; }
+  boost::asio::deadline_timer &timer() { return timer_; }
   int IncrementRetryCount() { return retry_count_++; }
   int IncrementFailoverCount();
   void GetPacket(std::string *res) const;
@@ -75,7 +75,7 @@ class Request {
   const std::string method_name_;
   const int call_id_;
 
-  ::asio::deadline_timer timer_;
+  boost::asio::deadline_timer timer_;
   std::string payload_;
   const Handler handler_;
 
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection.h b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection.h
index 9f7b3bb..f599d36 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection.h
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection.h
@@ -42,6 +42,8 @@
 #include <deque>
 #include <unordered_map>
 
+#include <boost/asio/ip/tcp.hpp>
+
 namespace hdfs {
 
 typedef const std::function<void(const Status &)> RpcCallback;
@@ -57,10 +59,10 @@ class RpcConnection : public std::enable_shared_from_this<RpcConnection> {
 
   // Note that a single server can have multiple endpoints - especially both
   //   an ipv4 and ipv6 endpoint
-  virtual void Connect(const std::vector<::asio::ip::tcp::endpoint> &server,
+  virtual void Connect(const std::vector<boost::asio::ip::tcp::endpoint> &server,
                        const AuthInfo & auth_info,
                        RpcCallback &handler) = 0;
-  virtual void ConnectAndFlush(const std::vector<::asio::ip::tcp::endpoint> &server) = 0;
+  virtual void ConnectAndFlush(const std::vector<boost::asio::ip::tcp::endpoint> &server) = 0;
   virtual void Disconnect() = 0;
 
   void StartReading();
@@ -110,9 +112,9 @@ class RpcConnection : public std::enable_shared_from_this<RpcConnection> {
   virtual void SendContext(RpcCallback &handler) = 0;
   void ContextComplete(const Status &s);
 
-  virtual void OnSendCompleted(const ::asio::error_code &ec,
+  virtual void OnSendCompleted(const boost::system::error_code &ec,
                                size_t transferred) = 0;
-  virtual void OnRecvCompleted(const ::asio::error_code &ec,
+  virtual void OnRecvCompleted(const boost::system::error_code &ec,
                                size_t transferred) = 0;
   virtual void FlushPendingRequests()=0;      // Synchronously write the next request
 
@@ -133,10 +135,10 @@ class RpcConnection : public std::enable_shared_from_this<RpcConnection> {
 
   Status HandleRpcResponse(std::shared_ptr<Response> response);
   void HandleRpcTimeout(std::shared_ptr<Request> req,
-                        const ::asio::error_code &ec);
+                        const boost::system::error_code &ec);
   void CommsError(const Status &status);
 
-  void ClearAndDisconnect(const ::asio::error_code &ec);
+  void ClearAndDisconnect(const boost::system::error_code &ec);
   std::shared_ptr<Request> RemoveFromRunningQueue(int call_id);
 
   std::weak_ptr<LockFreeRpcEngine> engine_;
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection_impl.cc b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection_impl.cc
index 43111ef..82fdfeb 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection_impl.cc
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection_impl.cc
@@ -23,6 +23,8 @@
 #include "ProtobufRpcEngine.pb.h"
 #include "IpcConnectionContext.pb.h"
 
+#include <boost/asio/error.hpp>
+
 namespace hdfs {
 
 namespace pb = ::google::protobuf;
@@ -89,7 +91,7 @@ void RpcConnection::StartReading() {
   }
 
   service->PostLambda(
-    [shared_this, this] () { OnRecvCompleted(::asio::error_code(), 0); }
+    [shared_this, this] () { OnRecvCompleted(boost::system::error_code(), 0); }
   );
 }
 
@@ -248,8 +250,8 @@ Status RpcConnection::HandleRpcResponse(std::shared_ptr<Response> response) {
 }
 
 void RpcConnection::HandleRpcTimeout(std::shared_ptr<Request> req,
-                                     const ::asio::error_code &ec) {
-  if (ec.value() == asio::error::operation_aborted) {
+                                     const boost::system::error_code &ec) {
+  if (ec.value() == boost::asio::error::operation_aborted) {
     return;
   }
 
@@ -260,7 +262,7 @@ void RpcConnection::HandleRpcTimeout(std::shared_ptr<Request> req,
     return;
   }
 
-  Status stat = ToStatus(ec ? ec : make_error_code(::asio::error::timed_out));
+  Status stat = ToStatus(ec ? ec : make_error_code(boost::asio::error::timed_out));
 
   r->OnResponseArrived(nullptr, stat);
 }
@@ -469,7 +471,7 @@ void RpcConnection::CommsError(const Status &status) {
   pinnedEngine->AsyncRpcCommsError(status, shared_from_this(), requestsToReturn);
 }
 
-void RpcConnection::ClearAndDisconnect(const ::asio::error_code &ec) {
+void RpcConnection::ClearAndDisconnect(const boost::system::error_code &ec) {
   Disconnect();
   std::vector<std::shared_ptr<Request>> requests;
   std::transform(sent_requests_.begin(), sent_requests_.end(),
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection_impl.h b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection_impl.h
index 1dd43af..884bd64 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection_impl.h
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection_impl.h
@@ -28,9 +28,11 @@
 #include "common/libhdfs_events_impl.h"
 #include "hdfspp/ioservice.h"
 
-#include <asio/connect.hpp>
-#include <asio/read.hpp>
-#include <asio/write.hpp>
+#include <boost/asio/connect.hpp>
+#include <boost/asio/read.hpp>
+#include <boost/asio/write.hpp>
+#include <boost/asio/ip/tcp.hpp>
+#include <boost/date_time/posix_time/posix_time_duration.hpp>
 
 #include <system_error>
 
@@ -44,17 +46,17 @@ public:
   RpcConnectionImpl(std::shared_ptr<RpcEngine> engine);
   virtual ~RpcConnectionImpl() override;
 
-  virtual void Connect(const std::vector<::asio::ip::tcp::endpoint> &server,
+  virtual void Connect(const std::vector<boost::asio::ip::tcp::endpoint> &server,
                        const AuthInfo & auth_info,
                        RpcCallback &handler) override;
   virtual void ConnectAndFlush(
-      const std::vector<::asio::ip::tcp::endpoint> &server) override;
+      const std::vector<boost::asio::ip::tcp::endpoint> &server) override;
   virtual void SendHandshake(RpcCallback &handler) override;
   virtual void SendContext(RpcCallback &handler) override;
   virtual void Disconnect() override;
-  virtual void OnSendCompleted(const ::asio::error_code &ec,
+  virtual void OnSendCompleted(const boost::system::error_code &ec,
                                size_t transferred) override;
-  virtual void OnRecvCompleted(const ::asio::error_code &ec,
+  virtual void OnRecvCompleted(const boost::system::error_code &ec,
                                size_t transferred) override;
   virtual void FlushPendingRequests() override;
 
@@ -65,12 +67,12 @@ public:
 
  private:
   const Options options_;
-  ::asio::ip::tcp::endpoint current_endpoint_;
-  std::vector<::asio::ip::tcp::endpoint> additional_endpoints_;
+  boost::asio::ip::tcp::endpoint current_endpoint_;
+  std::vector<boost::asio::ip::tcp::endpoint> additional_endpoints_;
   Socket socket_;
-  ::asio::deadline_timer connect_timer_;
+  boost::asio::deadline_timer connect_timer_;
 
-  void ConnectComplete(const ::asio::error_code &ec, const ::asio::ip::tcp::endpoint &remote);
+  void ConnectComplete(const boost::system::error_code &ec, const boost::asio::ip::tcp::endpoint &remote);
 };
 
 template <class Socket>
@@ -95,7 +97,7 @@ RpcConnectionImpl<Socket>::~RpcConnectionImpl() {
 
 template <class Socket>
 void RpcConnectionImpl<Socket>::Connect(
-    const std::vector<::asio::ip::tcp::endpoint> &server,
+    const std::vector<boost::asio::ip::tcp::endpoint> &server,
     const AuthInfo & auth_info,
     RpcCallback &handler) {
   LOG_TRACE(kRPC, << "RpcConnectionImpl::Connect called");
@@ -124,7 +126,7 @@ void RpcConnectionImpl<Socket>::Connect(
 
 template <class Socket>
 void RpcConnectionImpl<Socket>::ConnectAndFlush(
-    const std::vector<::asio::ip::tcp::endpoint> &server) {
+    const std::vector<boost::asio::ip::tcp::endpoint> &server) {
 
   LOG_INFO(kRPC, << "ConnectAndFlush called");
   std::lock_guard<std::mutex> state_lock(connection_state_lock_);
@@ -147,29 +149,29 @@ void RpcConnectionImpl<Socket>::ConnectAndFlush(
 
   // Take the first endpoint, but remember the alternatives for later
   additional_endpoints_ = server;
-  ::asio::ip::tcp::endpoint first_endpoint = additional_endpoints_.front();
+  boost::asio::ip::tcp::endpoint first_endpoint = additional_endpoints_.front();
   additional_endpoints_.erase(additional_endpoints_.begin());
   current_endpoint_ = first_endpoint;
 
   auto shared_this = shared_from_this();
-  socket_.async_connect(first_endpoint, [shared_this, this, first_endpoint](const ::asio::error_code &ec) {
+  socket_.async_connect(first_endpoint, [shared_this, this, first_endpoint](const boost::system::error_code &ec) {
     ConnectComplete(ec, first_endpoint);
   });
 
   // Prompt the timer to timeout
   auto weak_this = std::weak_ptr<RpcConnection>(shared_this);
   connect_timer_.expires_from_now(
-        std::chrono::milliseconds(options_.rpc_connect_timeout));
-  connect_timer_.async_wait([shared_this, this, first_endpoint](const ::asio::error_code &ec) {
+        boost::posix_time::milliseconds(options_.rpc_connect_timeout));
+  connect_timer_.async_wait([shared_this, this, first_endpoint](const boost::system::error_code &ec) {
       if (ec)
         ConnectComplete(ec, first_endpoint);
       else
-        ConnectComplete(make_error_code(asio::error::host_unreachable), first_endpoint);
+        ConnectComplete(make_error_code(boost::asio::error::host_unreachable), first_endpoint);
   });
 }
 
 template <class Socket>
-void RpcConnectionImpl<Socket>::ConnectComplete(const ::asio::error_code &ec, const ::asio::ip::tcp::endpoint & remote) {
+void RpcConnectionImpl<Socket>::ConnectComplete(const boost::system::error_code &ec, const boost::asio::ip::tcp::endpoint & remote) {
   auto shared_this = RpcConnectionImpl<Socket>::shared_from_this();
   std::lock_guard<std::mutex> state_lock(connection_state_lock_);
   connect_timer_.cancel();
@@ -211,20 +213,20 @@ void RpcConnectionImpl<Socket>::ConnectComplete(const ::asio::error_code &ec, co
     if (!additional_endpoints_.empty()) {
       // If we have additional endpoints, keep trying until we either run out or
       //    hit one
-      ::asio::ip::tcp::endpoint next_endpoint = additional_endpoints_.front();
+        boost::asio::ip::tcp::endpoint next_endpoint = additional_endpoints_.front();
       additional_endpoints_.erase(additional_endpoints_.begin());
       current_endpoint_ = next_endpoint;
 
-      socket_.async_connect(next_endpoint, [shared_this, this, next_endpoint](const ::asio::error_code &ec) {
+      socket_.async_connect(next_endpoint, [shared_this, this, next_endpoint](const boost::system::error_code &ec) {
         ConnectComplete(ec, next_endpoint);
       });
       connect_timer_.expires_from_now(
-            std::chrono::milliseconds(options_.rpc_connect_timeout));
-      connect_timer_.async_wait([shared_this, this, next_endpoint](const ::asio::error_code &ec) {
+            boost::posix_time::milliseconds(options_.rpc_connect_timeout));
+      connect_timer_.async_wait([shared_this, this, next_endpoint](const boost::system::error_code &ec) {
           if (ec)
             ConnectComplete(ec, next_endpoint);
           else
-            ConnectComplete(make_error_code(asio::error::host_unreachable), next_endpoint);
+            ConnectComplete(make_error_code(boost::asio::error::host_unreachable), next_endpoint);
         });
     } else {
       CommsError(status);
@@ -241,9 +243,9 @@ void RpcConnectionImpl<Socket>::SendHandshake(RpcCallback &handler) {
 
   auto shared_this = shared_from_this();
   auto handshake_packet = PrepareHandshakePacket();
-  ::asio::async_write(socket_, asio::buffer(*handshake_packet),
+  boost::asio::async_write(socket_, boost::asio::buffer(*handshake_packet),
                       [handshake_packet, handler, shared_this, this](
-                          const ::asio::error_code &ec, size_t) {
+                          const boost::system::error_code &ec, size_t) {
                         Status status = ToStatus(ec);
                         handler(status);
                       });
@@ -257,16 +259,16 @@ void RpcConnectionImpl<Socket>::SendContext(RpcCallback &handler) {
 
   auto shared_this = shared_from_this();
   auto context_packet = PrepareContextPacket();
-  ::asio::async_write(socket_, asio::buffer(*context_packet),
+  boost::asio::async_write(socket_, boost::asio::buffer(*context_packet),
                       [context_packet, handler, shared_this, this](
-                          const ::asio::error_code &ec, size_t) {
+                          const boost::system::error_code &ec, size_t) {
                         Status status = ToStatus(ec);
                         handler(status);
                       });
 }
 
 template <class Socket>
-void RpcConnectionImpl<Socket>::OnSendCompleted(const ::asio::error_code &ec,
+void RpcConnectionImpl<Socket>::OnSendCompleted(const boost::system::error_code &ec,
                                                    size_t) {
   using std::placeholders::_1;
   using std::placeholders::_2;
@@ -340,16 +342,16 @@ void RpcConnectionImpl<Socket>::FlushPendingRequests() {
     outgoing_request_ = req;
 
     req->timer().expires_from_now(
-        std::chrono::milliseconds(options_.rpc_timeout));
-    req->timer().async_wait([weak_this, weak_req, this](const ::asio::error_code &ec) {
+        boost::posix_time::milliseconds(options_.rpc_timeout));
+    req->timer().async_wait([weak_this, weak_req, this](const boost::system::error_code &ec) {
         auto timeout_this = weak_this.lock();
         auto timeout_req = weak_req.lock();
         if (timeout_this && timeout_req)
           this->HandleRpcTimeout(timeout_req, ec);
     });
 
-    asio::async_write(socket_, asio::buffer(*payload),
-                      [shared_this, this, payload](const ::asio::error_code &ec,
+    boost::asio::async_write(socket_, boost::asio::buffer(*payload),
+                      [shared_this, this, payload](const boost::system::error_code &ec,
                                                    size_t size) {
                         OnSendCompleted(ec, size);
                       });
@@ -374,13 +376,13 @@ void RpcConnectionImpl<Socket>::FlushPendingRequests() {
 
 
 template <class Socket>
-void RpcConnectionImpl<Socket>::OnRecvCompleted(const ::asio::error_code &original_ec,
+void RpcConnectionImpl<Socket>::OnRecvCompleted(const boost::system::error_code &original_ec,
                                                    size_t) {
   using std::placeholders::_1;
   using std::placeholders::_2;
   std::lock_guard<std::mutex> state_lock(connection_state_lock_);
 
-  ::asio::error_code my_ec(original_ec);
+  boost::system::error_code my_ec(original_ec);
 
   LOG_TRACE(kRPC, << "RpcConnectionImpl::OnRecvCompleted called");
 
@@ -390,7 +392,7 @@ void RpcConnectionImpl<Socket>::OnRecvCompleted(const ::asio::error_code &origin
     event_response event_resp = event_handlers_->call(FS_NN_READ_EVENT, cluster_name_.c_str(), 0);
 #ifndef LIBHDFSPP_SIMULATE_ERROR_DISABLED
     if (event_resp.response_type() == event_response::kTest_Error) {
-      my_ec = std::make_error_code(std::errc::network_down);
+      my_ec = boost::system::error_code(boost::system::errc::errc_t::network_down, boost::system::system_category());
     }
 #endif
   }
@@ -399,7 +401,7 @@ void RpcConnectionImpl<Socket>::OnRecvCompleted(const ::asio::error_code &origin
     case 0:
       // No errors
       break;
-    case asio::error::operation_aborted:
+    case boost::asio::error::operation_aborted:
       // The event loop has been shut down. Ignore the error.
       return;
     default:
@@ -414,20 +416,20 @@ void RpcConnectionImpl<Socket>::OnRecvCompleted(const ::asio::error_code &origin
 
   if (current_response_state_->state_ == Response::kReadLength) {
     current_response_state_->state_ = Response::kReadContent;
-    auto buf = ::asio::buffer(reinterpret_cast<char *>(&current_response_state_->length_),
+    auto buf = boost::asio::buffer(reinterpret_cast<char *>(&current_response_state_->length_),
                               sizeof(current_response_state_->length_));
-    asio::async_read(
+    boost::asio::async_read(
         socket_, buf,
-        [shared_this, this](const ::asio::error_code &ec, size_t size) {
+        [shared_this, this](const boost::system::error_code &ec, size_t size) {
           OnRecvCompleted(ec, size);
         });
   } else if (current_response_state_->state_ == Response::kReadContent) {
     current_response_state_->state_ = Response::kParseResponse;
     current_response_state_->length_ = ntohl(current_response_state_->length_);
     current_response_state_->data_.resize(current_response_state_->length_);
-    asio::async_read(
-        socket_, ::asio::buffer(current_response_state_->data_),
-        [shared_this, this](const ::asio::error_code &ec, size_t size) {
+    boost::asio::async_read(
+        socket_, boost::asio::buffer(current_response_state_->data_),
+        [shared_this, this](const boost::system::error_code &ec, size_t size) {
           OnRecvCompleted(ec, size);
         });
   } else if (current_response_state_->state_ == Response::kParseResponse) {
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_engine.cc b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_engine.cc
index ad6c9b9..06cda96 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_engine.cc
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_engine.cc
@@ -24,6 +24,8 @@
 
 #include <algorithm>
 
+#include <boost/date_time/posix_time/posix_time_duration.hpp>
+
 namespace hdfs {
 
 template <class T>
@@ -171,7 +173,7 @@ std::shared_ptr<RpcConnection> RpcEngine::NewConnection()
 {
   LOG_DEBUG(kRPC, << "RpcEngine::NewConnection called");
 
-  return std::make_shared<RpcConnectionImpl<::asio::ip::tcp::socket>>(shared_from_this());
+  return std::make_shared<RpcConnectionImpl<boost::asio::ip::tcp::socket>>(shared_from_this());
 }
 
 std::shared_ptr<RpcConnection> RpcEngine::InitializeConnection()
@@ -307,8 +309,8 @@ void RpcEngine::RpcCommsError(
       if (head_action->delayMillis > 0) {
         auto weak_conn = std::weak_ptr<RpcConnection>(conn_);
         retry_timer.expires_from_now(
-            std::chrono::milliseconds(head_action->delayMillis));
-        retry_timer.async_wait([this, weak_conn](asio::error_code ec) {
+            boost::posix_time::milliseconds(head_action->delayMillis));
+        retry_timer.async_wait([this, weak_conn](boost::system::error_code ec) {
           auto strong_conn = weak_conn.lock();
           if ( (!ec) && (strong_conn) ) {
             strong_conn->ConnectAndFlush(last_endpoints_);
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_engine.h b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_engine.h
index 845eaf5..13e56c5 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_engine.h
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_engine.h
@@ -31,8 +31,8 @@
 
 #include <google/protobuf/message_lite.h>
 
-#include <asio/ip/tcp.hpp>
-#include <asio/deadline_timer.hpp>
+#include <boost/asio/ip/tcp.hpp>
+#include <boost/asio/deadline_timer.hpp>
 
 #include <atomic>
 #include <memory>
@@ -160,7 +160,7 @@ protected:
   static std::string getRandomClientId();
 
   // Remember all of the last endpoints in case we need to reconnect and retry
-  std::vector<::asio::ip::tcp::endpoint> last_endpoints_;
+  std::vector<boost::asio::ip::tcp::endpoint> last_endpoints_;
 
 private:
   mutable std::shared_ptr<IoService> io_service_;
@@ -173,7 +173,7 @@ private:
   AuthInfo auth_info_;
   std::string cluster_name_;
   std::atomic_int call_id_;
-  ::asio::deadline_timer retry_timer;
+  boost::asio::deadline_timer retry_timer;
 
   std::shared_ptr<LibhdfsEvents> event_handlers_;
 
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/CMakeLists.txt b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/CMakeLists.txt
index 59fdbf2..2b2f4f1 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/CMakeLists.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/CMakeLists.txt
@@ -16,6 +16,8 @@
 # limitations under the License.
 #
 
+find_package(Boost REQUIRED COMPONENTS date_time)
+
 # Delegate some functionality to libhdfs, until libhdfspp is complete.
 set (LIBHDFS_SRC_DIR ../../libhdfs)
 set (LIBHDFS_TESTS_DIR ../../libhdfs-tests)
@@ -81,7 +83,7 @@ add_memcheck_test(retry_policy retry_policy_test)
 
 include_directories(${CMAKE_CURRENT_BINARY_DIR})
 add_executable(rpc_engine_test rpc_engine_test.cc ${PROTO_TEST_SRCS} ${PROTO_TEST_HDRS})
-target_link_libraries(rpc_engine_test test_common rpc proto common ${PROTOBUF_LIBRARIES} ${OPENSSL_LIBRARIES} ${SASL_LIBRARIES} gmock_main ${CMAKE_THREAD_LIBS_INIT})
+target_link_libraries(rpc_engine_test test_common rpc proto common ${PROTOBUF_LIBRARIES} ${OPENSSL_LIBRARIES} ${SASL_LIBRARIES} gmock_main ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES})
 add_memcheck_test(rpc_engine rpc_engine_test)
 
 add_executable(bad_datanode_test bad_datanode_test.cc)
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/bad_datanode_test.cc b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/bad_datanode_test.cc
index 23de015..5417af8 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/bad_datanode_test.cc
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/bad_datanode_test.cc
@@ -25,6 +25,9 @@
 
 #include <gmock/gmock.h>
 
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/error.hpp>
+
 using hadoop::common::TokenProto;
 using hadoop::hdfs::DatanodeInfoProto;
 using hadoop::hdfs::DatanodeIDProto;
@@ -42,7 +45,7 @@ class MockReader : public BlockReader {
 public:
   MOCK_METHOD2(
       AsyncReadPacket,
-      void(const asio::mutable_buffers_1 &,
+      void(const boost::asio::mutable_buffers_1 &,
            const std::function<void(const Status &, size_t transferred)> &));
 
   MOCK_METHOD5(AsyncRequestBlock,
@@ -69,17 +72,17 @@ class MockDNConnection : public DataNodeConnection, public std::enable_shared_fr
     }
 
   void async_read_some(const MutableBuffer &buf,
-        std::function<void (const asio::error_code & error,
+        std::function<void (const boost::system::error_code & error,
                                std::size_t bytes_transferred) > handler) override {
       (void)buf;
-      handler(asio::error::fault, 0);
+      handler(boost::asio::error::fault, 0);
   }
 
   void async_write_some(const ConstBuffer &buf,
-            std::function<void (const asio::error_code & error,
+            std::function<void (const boost::system::error_code & error,
                                  std::size_t bytes_transferred) > handler) override {
       (void)buf;
-      handler(asio::error::fault, 0);
+      handler(boost::asio::error::fault, 0);
   }
 
   virtual void Cancel() override {
@@ -141,7 +144,7 @@ TEST(BadDataNodeTest, TestNoNodes) {
   size_t read = 0;
 
   // Exclude the one datanode with the data
-  is.AsyncPreadSome(0, asio::buffer(buf, sizeof(buf)), nullptr,
+  is.AsyncPreadSome(0, boost::asio::buffer(buf, sizeof(buf)), nullptr,
       [&stat, &read](const Status &status, const std::string &, size_t transferred) {
         stat = status;
         read = transferred;
@@ -202,7 +205,7 @@ TEST(BadDataNodeTest, NNEventCallback) {
           Status::OK(), 0));
 
   is.AsyncPreadSome(
-      0, asio::buffer(buf, sizeof(buf)), nullptr,
+      0, boost::asio::buffer(buf, sizeof(buf)), nullptr,
       [&stat, &read](const Status &status, const std::string &,
                      size_t transferred) {
         stat = status;
@@ -248,7 +251,7 @@ TEST(BadDataNodeTest, RecoverableError) {
 
 
   is.AsyncPreadSome(
-      0, asio::buffer(buf, sizeof(buf)), nullptr,
+      0, boost::asio::buffer(buf, sizeof(buf)), nullptr,
       [&stat, &read](const Status &status, const std::string &,
                      size_t transferred) {
         stat = status;
@@ -300,7 +303,7 @@ TEST(BadDataNodeTest, InternalError) {
                                 sizeof(buf)));
 
   is.AsyncPreadSome(
-      0, asio::buffer(buf, sizeof(buf)), nullptr,
+      0, boost::asio::buffer(buf, sizeof(buf)), nullptr,
       [&stat, &read](const Status &status, const std::string &,
                      size_t transferred) {
         stat = status;
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/mock_connection.cc b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/mock_connection.cc
index 1885eea..37fabf5 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/mock_connection.cc
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/mock_connection.cc
@@ -20,7 +20,7 @@
 
 namespace hdfs {
 
-MockConnectionBase::MockConnectionBase(::asio::io_service *io_service)
+MockConnectionBase::MockConnectionBase(boost::asio::io_service *io_service)
     : io_service_(io_service)
 {}
 
@@ -31,7 +31,7 @@ ProducerResult SharedMockConnection::Produce() {
     return shared_prducer->Produce();
   } else {
     assert(false && "No producer registered");
-    return std::make_pair(asio::error_code(), "");
+    return std::make_pair(boost::system::error_code(), "");
   }
 }
 
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/mock_connection.h b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/mock_connection.h
index 82db760..7a7b5f0 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/mock_connection.h
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/mock_connection.h
@@ -20,21 +20,21 @@
 
 #include "common/async_stream.h"
 
-#include <asio/error_code.hpp>
-#include <asio/buffer.hpp>
-#include <asio/streambuf.hpp>
-#include <asio/io_service.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/streambuf.hpp>
+#include <boost/asio/io_service.hpp>
 
 #include <gmock/gmock.h>
 
 namespace hdfs {
 
-typedef std::pair<asio::error_code, std::string> ProducerResult;
+typedef std::pair<boost::system::error_code, std::string> ProducerResult;
 class AsioProducer {
 public:
   /*
    *  Return either:
-   *     (::asio::error_code(), <some data>) for a good result
+   *     (::boost::system::error_code(), <some data>) for a good result
    *     (<an ::asio::error instance>, <anything>) to pass an error to the caller
    *     (::asio::error::would_block, <anything>) to block the next call forever
    */
@@ -45,53 +45,53 @@ public:
 
 class MockConnectionBase : public AsioProducer, public AsyncStream {
 public:
-  MockConnectionBase(::asio::io_service *io_service);
+  MockConnectionBase(boost::asio::io_service *io_service);
   virtual ~MockConnectionBase();
-  typedef std::pair<asio::error_code, std::string> ProducerResult;
+  typedef std::pair<boost::system::error_code, std::string> ProducerResult;
 
   void async_read_some(const MutableBuffer &buf,
-          std::function<void (const asio::error_code & error,
+          std::function<void (const boost::system::error_code & error,
                                  std::size_t bytes_transferred) > handler) override {
     if (produced_.size() == 0) {
       ProducerResult r = Produce();
-      if (r.first == asio::error::would_block) {
+      if (r.first == boost::asio::error::would_block) {
         return; // No more reads to do
       }
       if (r.first) {
         io_service_->post(std::bind(handler, r.first, 0));
         return;
       }
-      asio::mutable_buffers_1 data = produced_.prepare(r.second.size());
-      asio::buffer_copy(data, asio::buffer(r.second));
+      boost::asio::mutable_buffers_1 data = produced_.prepare(r.second.size());
+      boost::asio::buffer_copy(data, boost::asio::buffer(r.second));
       produced_.commit(r.second.size());
     }
 
-    size_t len = std::min(asio::buffer_size(buf), produced_.size());
-    asio::buffer_copy(buf, produced_.data());
+    size_t len = std::min(boost::asio::buffer_size(buf), produced_.size());
+    boost::asio::buffer_copy(buf, produced_.data());
     produced_.consume(len);
-    io_service_->post(std::bind(handler, asio::error_code(), len));
+    io_service_->post(std::bind(handler, boost::system::error_code(), len));
   }
 
   void async_write_some(const ConstBuffer &buf,
-            std::function<void (const asio::error_code & error,
+            std::function<void (const boost::system::error_code & error,
                                  std::size_t bytes_transferred) > handler) override {
     // CompletionResult res = OnWrite(buf);
-    io_service_->post(std::bind(handler, asio::error_code(), asio::buffer_size(buf)));
+    io_service_->post(std::bind(handler, boost::system::error_code(), boost::asio::buffer_size(buf)));
   }
 
   template <class Endpoint, class Callback>
   void async_connect(const Endpoint &, Callback &&handler) {
-    io_service_->post([handler]() { handler(::asio::error_code()); });
+    io_service_->post([handler]() { handler(::boost::system::error_code()); });
   }
 
   virtual void cancel() {}
   virtual void close() {}
 protected:
   ProducerResult Produce() override = 0;
-  ::asio::io_service *io_service_;
+  boost::asio::io_service *io_service_;
 
 private:
-  asio::streambuf produced_;
+  boost::asio::streambuf produced_;
 };
 
 
@@ -114,10 +114,10 @@ public:
     assert(data);
 
     if (!data->checkProducerForConnect) {
-      io_service_->post([handler]() { handler(::asio::error_code()); });
+      io_service_->post([handler]() { handler(::boost::system::error_code()); });
     } else {
       ProducerResult result = Produce();
-      if (result.first == asio::error::would_block) {
+      if (result.first == boost::asio::error::would_block) {
         return; // Connect will hang
       } else {
         io_service_->post([handler, result]() { handler( result.first); });
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/remote_block_reader_test.cc b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/remote_block_reader_test.cc
index 3997e64..dfee686 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/remote_block_reader_test.cc
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/remote_block_reader_test.cc
@@ -29,6 +29,9 @@
 #include <google/protobuf/io/zero_copy_stream_impl.h>
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
+#include <boost/system/error_code.hpp>
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/io_service.hpp>
 
 #include <iostream>
 
@@ -44,9 +47,9 @@ using ::hadoop::hdfs::ReadOpChecksumInfoProto;
 using ::hadoop::hdfs::LocatedBlockProto;
 using ::hadoop::hdfs::LocatedBlocksProto;
 
-using ::asio::buffer;
-using ::asio::error_code;
-using ::asio::mutable_buffers_1;
+using boost::asio::buffer;
+using boost::system::error_code;
+using boost::asio::mutable_buffers_1;
 using ::testing::_;
 using ::testing::InvokeArgument;
 using ::testing::Return;
@@ -60,7 +63,7 @@ namespace hdfs {
 
 class MockDNConnection : public MockConnectionBase, public DataNodeConnection{
 public:
-  MockDNConnection(::asio::io_service &io_service)
+  MockDNConnection(boost::asio::io_service &io_service)
       : MockConnectionBase(&io_service), OnRead([](){}) {}
   MOCK_METHOD0(Produce, ProducerResult());
 
@@ -70,14 +73,14 @@ public:
   std::function<void(void)> OnRead;
 
   void async_read_some(const MutableBuffer &buf,
-        std::function<void (const asio::error_code & error,
+        std::function<void (const boost::system::error_code & error,
                                std::size_t bytes_transferred) > handler) override {
       this->OnRead();
       this->MockConnectionBase::async_read_some(buf, handler);
   }
 
   void async_write_some(const ConstBuffer &buf,
-            std::function<void (const asio::error_code & error,
+            std::function<void (const boost::system::error_code & error,
                                  std::size_t bytes_transferred) > handler) override {
     this->MockConnectionBase::async_write_some(buf, handler);
   }
@@ -96,7 +99,7 @@ public:
 
   MOCK_METHOD2(
       AsyncReadPacket,
-      void(const asio::mutable_buffers_1 &,
+      void(const boost::asio::mutable_buffers_1 &,
            const std::function<void(const Status &, size_t transferred)> &));
 
   MOCK_METHOD5(AsyncRequestBlock,
@@ -163,7 +166,7 @@ TEST(RemoteBlockReaderTest, TestReadSingleTrunk) {
       .WillOnce(InvokeArgument<1>(Status::OK(), sizeof(buf)));
 
   reader.AsyncReadBlock(
-       GetRandomClientName(), block, 0, asio::buffer(buf, sizeof(buf)),
+       GetRandomClientName(), block, 0, boost::asio::buffer(buf, sizeof(buf)),
       [&stat, &read](const Status &status, size_t transferred) {
         stat = status;
         read = transferred;
@@ -190,7 +193,7 @@ TEST(RemoteBlockReaderTest, TestReadMultipleTrunk) {
       .WillRepeatedly(InvokeArgument<1>(Status::OK(), sizeof(buf) / 4));
 
   reader.AsyncReadBlock(
-       GetRandomClientName(), block, 0, asio::buffer(buf, sizeof(buf)),
+       GetRandomClientName(), block, 0, boost::asio::buffer(buf, sizeof(buf)),
       [&stat, &read](const Status &status, size_t transferred) {
         stat = status;
         read = transferred;
@@ -218,7 +221,7 @@ TEST(RemoteBlockReaderTest, TestReadError) {
       .WillOnce(InvokeArgument<1>(Status::Error("error"), 0));
 
   reader.AsyncReadBlock(
-       GetRandomClientName(), block, 0, asio::buffer(buf, sizeof(buf)),
+       GetRandomClientName(), block, 0, boost::asio::buffer(buf, sizeof(buf)),
       [&stat, &read](const Status &status, size_t transferred) {
         stat = status;
         read = transferred;
@@ -250,7 +253,7 @@ ReadContent(std::shared_ptr<Stream> conn, const ExtendedBlockProto &block,
 TEST(RemoteBlockReaderTest, TestReadWholeBlock) {
   static const size_t kChunkSize = 512;
   static const string kChunkData(kChunkSize, 'a');
-  ::asio::io_service io_service;
+  boost::asio::io_service io_service;
   auto conn = std::make_shared<MockDNConnection>(io_service);
   BlockOpResponseProto block_op_resp;
 
@@ -287,7 +290,7 @@ TEST(RemoteBlockReaderTest, TestCancelWhileReceiving) {
 
   static const size_t kChunkSize = 512;
   static const string kChunkData(kChunkSize, 'a');
-  ::asio::io_service io_service;
+  boost::asio::io_service io_service;
   auto conn = std::make_shared<MockDNConnection>(io_service);
   BlockOpResponseProto block_op_resp;
 
@@ -338,7 +341,7 @@ TEST(RemoteBlockReaderTest, TestReadWithinChunk) {
   static const size_t kOffset = kChunkSize / 4;
   static const string kChunkData = string(kOffset, 'a') + string(kLength, 'b');
 
-  ::asio::io_service io_service;
+  boost::asio::io_service io_service;
   auto conn = std::make_shared<MockDNConnection>(io_service);
   BlockOpResponseProto block_op_resp;
   ReadOpChecksumInfoProto *checksum_info =
@@ -378,7 +381,7 @@ TEST(RemoteBlockReaderTest, TestReadMultiplePacket) {
   static const size_t kChunkSize = 1024;
   static const string kChunkData(kChunkSize, 'a');
 
-  ::asio::io_service io_service;
+  boost::asio::io_service io_service;
   auto conn = std::make_shared<MockDNConnection>(io_service);
   BlockOpResponseProto block_op_resp;
   block_op_resp.set_status(::hadoop::hdfs::Status::SUCCESS);
@@ -428,7 +431,7 @@ TEST(RemoteBlockReaderTest, TestReadCancelBetweenPackets) {
   static const size_t kChunkSize = 1024;
   static const string kChunkData(kChunkSize, 'a');
 
-  ::asio::io_service io_service;
+  boost::asio::io_service io_service;
   auto conn = std::make_shared<MockDNConnection>(io_service);
   BlockOpResponseProto block_op_resp;
   block_op_resp.set_status(::hadoop::hdfs::Status::SUCCESS);
@@ -482,7 +485,7 @@ TEST(RemoteBlockReaderTest, TestSaslConnection) {
   static const string kAuthPayload = "realm=\"0\",nonce=\"+GAWc+O6yEAWpew/"
                                      "qKah8qh4QZLoOLCDcTtEKhlS\",qop=\"auth\","
                                      "charset=utf-8,algorithm=md5-sess";
-  ::asio::io_service io_service;
+  boost::asio::io_service io_service;
   auto conn = std::make_shared<MockDNConnection>(io_service);
   BlockOpResponseProto block_op_resp;
   block_op_resp.set_status(::hadoop::hdfs::Status::SUCCESS);
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/rpc_engine_test.cc b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/rpc_engine_test.cc
index 6bbe725..744e7eb 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/rpc_engine_test.cc
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/rpc_engine_test.cc
@@ -26,6 +26,8 @@
 
 #include <google/protobuf/io/coded_stream.h>
 #include <gmock/gmock.h>
+#include <boost/system/error_code.hpp>
+#include <boost/date_time/posix_time/posix_time_duration.hpp>
 
 using ::hadoop::common::RpcResponseHeaderProto;
 using ::hadoop::common::EmptyRequestProto;
@@ -33,8 +35,6 @@ using ::hadoop::common::EmptyResponseProto;
 using ::hadoop::common::EchoRequestProto;
 using ::hadoop::common::EchoResponseProto;
 
-using ::asio::error_code;
-
 using ::testing::Return;
 
 using ::std::make_pair;
@@ -47,20 +47,20 @@ namespace hdfs {
 
 std::vector<ResolvedNamenodeInfo> make_endpoint() {
   ResolvedNamenodeInfo result;
-  result.endpoints.push_back(asio::ip::basic_endpoint<asio::ip::tcp>());
+  result.endpoints.push_back(boost::asio::ip::basic_endpoint<boost::asio::ip::tcp>());
   return std::vector<ResolvedNamenodeInfo>({result});
 }
 
 class MockRPCConnection : public MockConnectionBase {
  public:
-  MockRPCConnection(::asio::io_service &io_service)
+  MockRPCConnection(boost::asio::io_service &io_service)
       : MockConnectionBase(&io_service) {}
   MOCK_METHOD0(Produce, ProducerResult());
 };
 
 class SharedMockRPCConnection : public SharedMockConnection {
  public:
-  SharedMockRPCConnection(::asio::io_service &io_service)
+  SharedMockRPCConnection(boost::asio::io_service &io_service)
       : SharedMockConnection(&io_service) {}
 };
 
@@ -79,9 +79,9 @@ protected:
 
 }
 
-static inline std::pair<error_code, string> RpcResponse(
+static inline std::pair<boost::system::error_code, string> RpcResponse(
     const RpcResponseHeaderProto &h, const std::string &data,
-    const ::asio::error_code &ec = error_code()) {
+    const boost::system::error_code &ec = boost::system::error_code()) {
   uint32_t payload_length =
       pbio::CodedOutputStream::VarintSize32(h.ByteSize()) +
       pbio::CodedOutputStream::VarintSize32(data.size()) + h.ByteSize() +
@@ -157,7 +157,7 @@ TEST(RpcEngineTest, TestConnectionResetAndFail) {
   h.set_status(RpcResponseHeaderProto::SUCCESS);
   EXPECT_CALL(conn->TEST_get_mutable_socket(), Produce())
       .WillOnce(Return(RpcResponse(
-          h, "", make_error_code(::asio::error::connection_reset))));
+          h, "", make_error_code(boost::asio::error::connection_reset))));
 
   std::shared_ptr<RpcConnection> conn_ptr(conn);
   engine->TEST_SetRpcConnection(conn_ptr);
@@ -200,7 +200,7 @@ TEST(RpcEngineTest, TestConnectionResetAndRecover) {
   h.set_status(RpcResponseHeaderProto::SUCCESS);
   EXPECT_CALL(*producer, Produce())
       .WillOnce(Return(RpcResponse(
-          h, "", make_error_code(::asio::error::connection_reset))))
+          h, "", make_error_code(boost::asio::error::connection_reset))))
       .WillOnce(Return(RpcResponse(h, server_resp.SerializeAsString())));
   SharedMockConnection::SetSharedConnectionData(producer);
 
@@ -240,7 +240,7 @@ TEST(RpcEngineTest, TestConnectionResetAndRecoverWithDelay) {
   h.set_status(RpcResponseHeaderProto::SUCCESS);
   EXPECT_CALL(*producer, Produce())
       .WillOnce(Return(RpcResponse(
-          h, "", make_error_code(::asio::error::connection_reset))))
+          h, "", make_error_code(boost::asio::error::connection_reset))))
       .WillOnce(Return(RpcResponse(h, server_resp.SerializeAsString())));
   SharedMockConnection::SetSharedConnectionData(producer);
 
@@ -254,9 +254,9 @@ TEST(RpcEngineTest, TestConnectionResetAndRecoverWithDelay) {
     ASSERT_TRUE(stat.ok());
   });
 
-  ::asio::deadline_timer timer(io_service->GetRaw());
-  timer.expires_from_now(std::chrono::hours(100));
-  timer.async_wait([](const asio::error_code & err){(void)err; ASSERT_FALSE("Timed out"); });
+  boost::asio::deadline_timer timer(io_service->GetRaw());
+  timer.expires_from_now(boost::posix_time::hours(100));
+  timer.async_wait([](const boost::system::error_code & err){(void)err; ASSERT_FALSE("Timed out"); });
 
   io_service->Run();
   ASSERT_TRUE(complete);
@@ -279,7 +279,7 @@ TEST(RpcEngineTest, TestConnectionFailure)
   std::shared_ptr<SharedConnectionEngine> engine
       = std::make_shared<SharedConnectionEngine>(io_service, options, "foo", "", "protocol", 1);
   EXPECT_CALL(*producer, Produce())
-      .WillOnce(Return(std::make_pair(make_error_code(::asio::error::connection_reset), "")));
+      .WillOnce(Return(std::make_pair(make_error_code(boost::asio::error::connection_reset), "")));
 
   engine->Connect("", make_endpoint(), [&complete, io_service](const Status &stat) {
     complete = true;
@@ -306,9 +306,9 @@ TEST(RpcEngineTest, TestConnectionFailureRetryAndFailure)
   std::shared_ptr<SharedConnectionEngine> engine =
       std::make_shared<SharedConnectionEngine>(io_service, options, "foo", "", "protocol", 1);
   EXPECT_CALL(*producer, Produce())
-      .WillOnce(Return(std::make_pair(make_error_code(::asio::error::connection_reset), "")))
-      .WillOnce(Return(std::make_pair(make_error_code(::asio::error::connection_reset), "")))
-      .WillOnce(Return(std::make_pair(make_error_code(::asio::error::connection_reset), "")));
+      .WillOnce(Return(std::make_pair(make_error_code(boost::asio::error::connection_reset), "")))
+      .WillOnce(Return(std::make_pair(make_error_code(boost::asio::error::connection_reset), "")))
+      .WillOnce(Return(std::make_pair(make_error_code(boost::asio::error::connection_reset), "")));
 
   engine->Connect("", make_endpoint(), [&complete, io_service](const Status &stat) {
     complete = true;
@@ -335,9 +335,9 @@ TEST(RpcEngineTest, TestConnectionFailureAndRecover)
   std::shared_ptr<SharedConnectionEngine> engine =
       std::make_shared<SharedConnectionEngine>(io_service, options, "foo", "", "protocol", 1);
   EXPECT_CALL(*producer, Produce())
-      .WillOnce(Return(std::make_pair(make_error_code(::asio::error::connection_reset), "")))
-      .WillOnce(Return(std::make_pair(::asio::error_code(), "")))
-      .WillOnce(Return(std::make_pair(::asio::error::would_block, "")));
+      .WillOnce(Return(std::make_pair(make_error_code(boost::asio::error::connection_reset), "")))
+      .WillOnce(Return(std::make_pair(boost::system::error_code(), "")))
+      .WillOnce(Return(std::make_pair(boost::asio::error::would_block, "")));
 
   engine->Connect("", make_endpoint(), [&complete, io_service](const Status &stat) {
     complete = true;
@@ -390,8 +390,8 @@ TEST(RpcEngineTest, TestEventCallbacks)
   h.set_callid(1);
   h.set_status(RpcResponseHeaderProto::SUCCESS);
   EXPECT_CALL(*producer, Produce())
-      .WillOnce(Return(std::make_pair(::asio::error_code(), ""))) // subverted by callback
-      .WillOnce(Return(std::make_pair(::asio::error_code(), "")))
+      .WillOnce(Return(std::make_pair(boost::system::error_code(), ""))) // subverted by callback
+      .WillOnce(Return(std::make_pair(boost::system::error_code(), "")))
       .WillOnce(Return(RpcResponse(h, "b"))) // subverted by callback
       .WillOnce(Return(RpcResponse(h, server_resp.SerializeAsString())));
   SharedMockConnection::SetSharedConnectionData(producer);
@@ -444,9 +444,9 @@ TEST(RpcEngineTest, TestConnectionFailureAndAsyncRecover)
   std::shared_ptr<SharedConnectionEngine> engine =
       std::make_shared<SharedConnectionEngine>(io_service, options, "foo", "", "protocol", 1);
   EXPECT_CALL(*producer, Produce())
-      .WillOnce(Return(std::make_pair(make_error_code(::asio::error::connection_reset), "")))
-      .WillOnce(Return(std::make_pair(::asio::error_code(), "")))
-      .WillOnce(Return(std::make_pair(::asio::error::would_block, "")));
+      .WillOnce(Return(std::make_pair(make_error_code(boost::asio::error::connection_reset), "")))
+      .WillOnce(Return(std::make_pair(boost::system::error_code(), "")))
+      .WillOnce(Return(std::make_pair(boost::asio::error::would_block, "")));
 
   engine->Connect("", make_endpoint(), [&complete, io_service](const Status &stat) {
     complete = true;
@@ -454,9 +454,9 @@ TEST(RpcEngineTest, TestConnectionFailureAndAsyncRecover)
     ASSERT_TRUE(stat.ok());
   });
 
-  ::asio::deadline_timer timer(io_service->GetRaw());
-  timer.expires_from_now(std::chrono::hours(100));
-  timer.async_wait([](const asio::error_code & err){(void)err; ASSERT_FALSE("Timed out"); });
+  boost::asio::deadline_timer timer(io_service->GetRaw());
+  timer.expires_from_now(boost::posix_time::hours(100));
+  timer.async_wait([](const boost::system::error_code & err){(void)err; ASSERT_FALSE("Timed out"); });
 
   io_service->Run();
   ASSERT_TRUE(complete);
@@ -473,7 +473,7 @@ TEST(RpcEngineTest, TestTimeout) {
   conn->StartReading();
 
     EXPECT_CALL(conn->TEST_get_mutable_socket(), Produce())
-        .WillOnce(Return(std::make_pair(::asio::error::would_block, "")));
+        .WillOnce(Return(std::make_pair(boost::asio::error::would_block, "")));
 
   std::shared_ptr<RpcConnection> conn_ptr(conn);
   engine->TEST_SetRpcConnection(conn_ptr);
@@ -489,9 +489,9 @@ TEST(RpcEngineTest, TestTimeout) {
     ASSERT_FALSE(stat.ok());
   });
 
-  ::asio::deadline_timer timer(io_service->GetRaw());
-  timer.expires_from_now(std::chrono::hours(100));
-  timer.async_wait([](const asio::error_code & err){(void)err; ASSERT_FALSE("Timed out"); });
+  boost::asio::deadline_timer timer(io_service->GetRaw());
+  timer.expires_from_now(boost::posix_time::hours(100));
+  timer.async_wait([](const boost::system::error_code & err){(void)err; ASSERT_FALSE("Timed out"); });
 
   io_service->Run();
   ASSERT_TRUE(complete);
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/COPYING b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/COPYING
deleted file mode 100644
index e86a381..0000000
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/COPYING
+++ /dev/null
@@ -1,4 +0,0 @@
-Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-
-Distributed under the Boost Software License, Version 1.0. (See accompanying
-file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio.hpp b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio.hpp
deleted file mode 100644
index 1f47840..0000000
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio.hpp
+++ /dev/null
@@ -1,122 +0,0 @@
-//
-// asio.hpp
-// ~~~~~~~~
-//
-// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef ASIO_HPP
-#define ASIO_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/async_result.hpp"
-#include "asio/basic_datagram_socket.hpp"
-#include "asio/basic_deadline_timer.hpp"
-#include "asio/basic_io_object.hpp"
-#include "asio/basic_raw_socket.hpp"
-#include "asio/basic_seq_packet_socket.hpp"
-#include "asio/basic_serial_port.hpp"
-#include "asio/basic_signal_set.hpp"
-#include "asio/basic_socket_acceptor.hpp"
-#include "asio/basic_socket_iostream.hpp"
-#include "asio/basic_socket_streambuf.hpp"
-#include "asio/basic_stream_socket.hpp"
-#include "asio/basic_streambuf.hpp"
-#include "asio/basic_waitable_timer.hpp"
-#include "asio/buffer.hpp"
-#include "asio/buffered_read_stream_fwd.hpp"
-#include "asio/buffered_read_stream.hpp"
-#include "asio/buffered_stream_fwd.hpp"
-#include "asio/buffered_stream.hpp"
-#include "asio/buffered_write_stream_fwd.hpp"
-#include "asio/buffered_write_stream.hpp"
-#include "asio/buffers_iterator.hpp"
-#include "asio/completion_condition.hpp"
-#include "asio/connect.hpp"
-#include "asio/coroutine.hpp"
-#include "asio/datagram_socket_service.hpp"
-#include "asio/deadline_timer_service.hpp"
-#include "asio/deadline_timer.hpp"
-#include "asio/error.hpp"
-#include "asio/error_code.hpp"
-#include "asio/generic/basic_endpoint.hpp"
-#include "asio/generic/datagram_protocol.hpp"
-#include "asio/generic/raw_protocol.hpp"
-#include "asio/generic/seq_packet_protocol.hpp"
-#include "asio/generic/stream_protocol.hpp"
-#include "asio/handler_alloc_hook.hpp"
-#include "asio/handler_continuation_hook.hpp"
-#include "asio/handler_invoke_hook.hpp"
-#include "asio/handler_type.hpp"
-#include "asio/io_service.hpp"
-#include "asio/ip/address.hpp"
-#include "asio/ip/address_v4.hpp"
-#include "asio/ip/address_v6.hpp"
-#include "asio/ip/basic_endpoint.hpp"
-#include "asio/ip/basic_resolver.hpp"
-#include "asio/ip/basic_resolver_entry.hpp"
-#include "asio/ip/basic_resolver_iterator.hpp"
-#include "asio/ip/basic_resolver_query.hpp"
-#include "asio/ip/host_name.hpp"
-#include "asio/ip/icmp.hpp"
-#include "asio/ip/multicast.hpp"
-#include "asio/ip/resolver_query_base.hpp"
-#include "asio/ip/resolver_service.hpp"
-#include "asio/ip/tcp.hpp"
-#include "asio/ip/udp.hpp"
-#include "asio/ip/unicast.hpp"
-#include "asio/ip/v6_only.hpp"
-#include "asio/is_read_buffered.hpp"
-#include "asio/is_write_buffered.hpp"
-#include "asio/local/basic_endpoint.hpp"
-#include "asio/local/connect_pair.hpp"
-#include "asio/local/datagram_protocol.hpp"
-#include "asio/local/stream_protocol.hpp"
-#include "asio/placeholders.hpp"
-#include "asio/posix/basic_descriptor.hpp"
-#include "asio/posix/basic_stream_descriptor.hpp"
-#include "asio/posix/descriptor_base.hpp"
-#include "asio/posix/stream_descriptor.hpp"
-#include "asio/posix/stream_descriptor_service.hpp"
-#include "asio/raw_socket_service.hpp"
-#include "asio/read.hpp"
-#include "asio/read_at.hpp"
-#include "asio/read_until.hpp"
-#include "asio/seq_packet_socket_service.hpp"
-#include "asio/serial_port.hpp"
-#include "asio/serial_port_base.hpp"
-#include "asio/serial_port_service.hpp"
-#include "asio/signal_set.hpp"
-#include "asio/signal_set_service.hpp"
-#include "asio/socket_acceptor_service.hpp"
-#include "asio/socket_base.hpp"
-#include "asio/strand.hpp"
-#include "asio/stream_socket_service.hpp"
-#include "asio/streambuf.hpp"
-#include "asio/system_error.hpp"
-#include "asio/thread.hpp"
-#include "asio/time_traits.hpp"
-#include "asio/version.hpp"
-#include "asio/wait_traits.hpp"
-#include "asio/waitable_timer_service.hpp"
-#include "asio/windows/basic_handle.hpp"
-#include "asio/windows/basic_object_handle.hpp"
-#include "asio/windows/basic_random_access_handle.hpp"
-#include "asio/windows/basic_stream_handle.hpp"
-#include "asio/windows/object_handle.hpp"
-#include "asio/windows/object_handle_service.hpp"
-#include "asio/windows/overlapped_ptr.hpp"
-#include "asio/windows/random_access_handle.hpp"
-#include "asio/windows/random_access_handle_service.hpp"
-#include "asio/windows/stream_handle.hpp"
-#include "asio/windows/stream_handle_service.hpp"
-#include "asio/write.hpp"
-#include "asio/write_at.hpp"
-
-#endif // ASIO_HPP
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/async_result.hpp b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/async_result.hpp
deleted file mode 100644
index b98d770..0000000
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/async_result.hpp
+++ /dev/null
@@ -1,94 +0,0 @@
-//
-// async_result.hpp
-// ~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef ASIO_ASYNC_RESULT_HPP
-#define ASIO_ASYNC_RESULT_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/handler_type.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-/// An interface for customising the behaviour of an initiating function.
-/**
- * This template may be specialised for user-defined handler types.
- */
-template <typename Handler>
-class async_result
-{
-public:
-  /// The return type of the initiating function.
-  typedef void type;
-
-  /// Construct an async result from a given handler.
-  /**
-   * When using a specalised async_result, the constructor has an opportunity
-   * to initialise some state associated with the handler, which is then
-   * returned from the initiating function.
-   */
-  explicit async_result(Handler&)
-  {
-  }
-
-  /// Obtain the value to be returned from the initiating function.
-  type get()
-  {
-  }
-};
-
-namespace detail {
-
-// Helper template to deduce the true type of a handler, capture a local copy
-// of the handler, and then create an async_result for the handler.
-template <typename Handler, typename Signature>
-struct async_result_init
-{
-  explicit async_result_init(ASIO_MOVE_ARG(Handler) orig_handler)
-    : handler(ASIO_MOVE_CAST(Handler)(orig_handler)),
-      result(handler)
-  {
-  }
-
-  typename handler_type<Handler, Signature>::type handler;
-  async_result<typename handler_type<Handler, Signature>::type> result;
-};
-
-template <typename Handler, typename Signature>
-struct async_result_type_helper
-{
-  typedef typename async_result<
-      typename handler_type<Handler, Signature>::type
-    >::type type;
-};
-
-} // namespace detail
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#if defined(GENERATING_DOCUMENTATION)
-# define ASIO_INITFN_RESULT_TYPE(h, sig) \
-  void_or_deduced
-#elif defined(_MSC_VER) && (_MSC_VER < 1500)
-# define ASIO_INITFN_RESULT_TYPE(h, sig) \
-  typename ::asio::detail::async_result_type_helper<h, sig>::type
-#else
-# define ASIO_INITFN_RESULT_TYPE(h, sig) \
-  typename ::asio::async_result< \
-    typename ::asio::handler_type<h, sig>::type>::type
-#endif
-
-#endif // ASIO_ASYNC_RESULT_HPP
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_datagram_socket.hpp b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_datagram_socket.hpp
deleted file mode 100644
index a1356b9..0000000
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_datagram_socket.hpp
+++ /dev/null
@@ -1,949 +0,0 @@
-//
-// basic_datagram_socket.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef ASIO_BASIC_DATAGRAM_SOCKET_HPP
-#define ASIO_BASIC_DATAGRAM_SOCKET_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include <cstddef>
-#include "asio/basic_socket.hpp"
-#include "asio/datagram_socket_service.hpp"
-#include "asio/detail/handler_type_requirements.hpp"
-#include "asio/detail/throw_error.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/error.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-/// Provides datagram-oriented socket functionality.
-/**
- * The basic_datagram_socket class template provides asynchronous and blocking
- * datagram-oriented socket functionality.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-template <typename Protocol,
-    typename DatagramSocketService = datagram_socket_service<Protocol> >
-class basic_datagram_socket
-  : public basic_socket<Protocol, DatagramSocketService>
-{
-public:
-  /// (Deprecated: Use native_handle_type.) The native representation of a
-  /// socket.
-  typedef typename DatagramSocketService::native_handle_type native_type;
-
-  /// The native representation of a socket.
-  typedef typename DatagramSocketService::native_handle_type native_handle_type;
-
-  /// The protocol type.
-  typedef Protocol protocol_type;
-
-  /// The endpoint type.
-  typedef typename Protocol::endpoint endpoint_type;
-
-  /// Construct a basic_datagram_socket without opening it.
-  /**
-   * This constructor creates a datagram socket without opening it. The open()
-   * function must be called before data can be sent or received on the socket.
-   *
-   * @param io_service The io_service object that the datagram socket will use
-   * to dispatch handlers for any asynchronous operations performed on the
-   * socket.
-   */
-  explicit basic_datagram_socket(asio::io_service& io_service)
-    : basic_socket<Protocol, DatagramSocketService>(io_service)
-  {
-  }
-
-  /// Construct and open a basic_datagram_socket.
-  /**
-   * This constructor creates and opens a datagram socket.
-   *
-   * @param io_service The io_service object that the datagram socket will use
-   * to dispatch handlers for any asynchronous operations performed on the
-   * socket.
-   *
-   * @param protocol An object specifying protocol parameters to be used.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  basic_datagram_socket(asio::io_service& io_service,
-      const protocol_type& protocol)
-    : basic_socket<Protocol, DatagramSocketService>(io_service, protocol)
-  {
-  }
-
-  /// Construct a basic_datagram_socket, opening it and binding it to the given
-  /// local endpoint.
-  /**
-   * This constructor creates a datagram socket and automatically opens it bound
-   * to the specified endpoint on the local machine. The protocol used is the
-   * protocol associated with the given endpoint.
-   *
-   * @param io_service The io_service object that the datagram socket will use
-   * to dispatch handlers for any asynchronous operations performed on the
-   * socket.
-   *
-   * @param endpoint An endpoint on the local machine to which the datagram
-   * socket will be bound.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  basic_datagram_socket(asio::io_service& io_service,
-      const endpoint_type& endpoint)
-    : basic_socket<Protocol, DatagramSocketService>(io_service, endpoint)
-  {
-  }
-
-  /// Construct a basic_datagram_socket on an existing native socket.
-  /**
-   * This constructor creates a datagram socket object to hold an existing
-   * native socket.
-   *
-   * @param io_service The io_service object that the datagram socket will use
-   * to dispatch handlers for any asynchronous operations performed on the
-   * socket.
-   *
-   * @param protocol An object specifying protocol parameters to be used.
-   *
-   * @param native_socket The new underlying socket implementation.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  basic_datagram_socket(asio::io_service& io_service,
-      const protocol_type& protocol, const native_handle_type& native_socket)
-    : basic_socket<Protocol, DatagramSocketService>(
-        io_service, protocol, native_socket)
-  {
-  }
-
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-  /// Move-construct a basic_datagram_socket from another.
-  /**
-   * This constructor moves a datagram socket from one object to another.
-   *
-   * @param other The other basic_datagram_socket object from which the move
-   * will occur.
-   *
-   * @note Following the move, the moved-from object is in the same state as if
-   * constructed using the @c basic_datagram_socket(io_service&) constructor.
-   */
-  basic_datagram_socket(basic_datagram_socket&& other)
-    : basic_socket<Protocol, DatagramSocketService>(
-        ASIO_MOVE_CAST(basic_datagram_socket)(other))
-  {
-  }
-
-  /// Move-assign a basic_datagram_socket from another.
-  /**
-   * This assignment operator moves a datagram socket from one object to
-   * another.
-   *
-   * @param other The other basic_datagram_socket object from which the move
-   * will occur.
-   *
-   * @note Following the move, the moved-from object is in the same state as if
-   * constructed using the @c basic_datagram_socket(io_service&) constructor.
-   */
-  basic_datagram_socket& operator=(basic_datagram_socket&& other)
-  {
-    basic_socket<Protocol, DatagramSocketService>::operator=(
-        ASIO_MOVE_CAST(basic_datagram_socket)(other));
-    return *this;
-  }
-
-  /// Move-construct a basic_datagram_socket from a socket of another protocol
-  /// type.
-  /**
-   * This constructor moves a datagram socket from one object to another.
-   *
-   * @param other The other basic_datagram_socket object from which the move
-   * will occur.
-   *
-   * @note Following the move, the moved-from object is in the same state as if
-   * constructed using the @c basic_datagram_socket(io_service&) constructor.
-   */
-  template <typename Protocol1, typename DatagramSocketService1>
-  basic_datagram_socket(
-      basic_datagram_socket<Protocol1, DatagramSocketService1>&& other,
-      typename enable_if<is_convertible<Protocol1, Protocol>::value>::type* = 0)
-    : basic_socket<Protocol, DatagramSocketService>(
-        ASIO_MOVE_CAST2(basic_datagram_socket<
-          Protocol1, DatagramSocketService1>)(other))
-  {
-  }
-
-  /// Move-assign a basic_datagram_socket from a socket of another protocol
-  /// type.
-  /**
-   * This assignment operator moves a datagram socket from one object to
-   * another.
-   *
-   * @param other The other basic_datagram_socket object from which the move
-   * will occur.
-   *
-   * @note Following the move, the moved-from object is in the same state as if
-   * constructed using the @c basic_datagram_socket(io_service&) constructor.
-   */
-  template <typename Protocol1, typename DatagramSocketService1>
-  typename enable_if<is_convertible<Protocol1, Protocol>::value,
-      basic_datagram_socket>::type& operator=(
-        basic_datagram_socket<Protocol1, DatagramSocketService1>&& other)
-  {
-    basic_socket<Protocol, DatagramSocketService>::operator=(
-        ASIO_MOVE_CAST2(basic_datagram_socket<
-          Protocol1, DatagramSocketService1>)(other));
-    return *this;
-  }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
-  /// Send some data on a connected socket.
-  /**
-   * This function is used to send data on the datagram socket. The function
-   * call will block until the data has been sent successfully or an error
-   * occurs.
-   *
-   * @param buffers One ore more data buffers to be sent on the socket.
-   *
-   * @returns The number of bytes sent.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @note The send operation can only be used with a connected socket. Use
-   * the send_to function to send data on an unconnected datagram socket.
-   *
-   * @par Example
-   * To send a single data buffer use the @ref buffer function as follows:
-   * @code socket.send(asio::buffer(data, size)); @endcode
-   * See the @ref buffer documentation for information on sending multiple
-   * buffers in one go, and how to use it with arrays, boost::array or
-   * std::vector.
-   */
-  template <typename ConstBufferSequence>
-  std::size_t send(const ConstBufferSequence& buffers)
-  {
-    asio::error_code ec;
-    std::size_t s = this->get_service().send(
-        this->get_implementation(), buffers, 0, ec);
-    asio::detail::throw_error(ec, "send");
-    return s;
-  }
-
-  /// Send some data on a connected socket.
-  /**
-   * This function is used to send data on the datagram socket. The function
-   * call will block until the data has been sent successfully or an error
-   * occurs.
-   *
-   * @param buffers One ore more data buffers to be sent on the socket.
-   *
-   * @param flags Flags specifying how the send call is to be made.
-   *
-   * @returns The number of bytes sent.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @note The send operation can only be used with a connected socket. Use
-   * the send_to function to send data on an unconnected datagram socket.
-   */
-  template <typename ConstBufferSequence>
-  std::size_t send(const ConstBufferSequence& buffers,
-      socket_base::message_flags flags)
-  {
-    asio::error_code ec;
-    std::size_t s = this->get_service().send(
-        this->get_implementation(), buffers, flags, ec);
-    asio::detail::throw_error(ec, "send");
-    return s;
-  }
-
-  /// Send some data on a connected socket.
-  /**
-   * This function is used to send data on the datagram socket. The function
-   * call will block until the data has been sent successfully or an error
-   * occurs.
-   *
-   * @param buffers One or more data buffers to be sent on the socket.
-   *
-   * @param flags Flags specifying how the send call is to be made.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @returns The number of bytes sent.
-   *
-   * @note The send operation can only be used with a connected socket. Use
-   * the send_to function to send data on an unconnected datagram socket.
-   */
-  template <typename ConstBufferSequence>
-  std::size_t send(const ConstBufferSequence& buffers,
-      socket_base::message_flags flags, asio::error_code& ec)
-  {
-    return this->get_service().send(
-        this->get_implementation(), buffers, flags, ec);
-  }
-
-  /// Start an asynchronous send on a connected socket.
-  /**
-   * This function is used to asynchronously send data on the datagram socket.
-   * The function call always returns immediately.
-   *
-   * @param buffers One or more data buffers to be sent on the socket. Although
-   * the buffers object may be copied as necessary, ownership of the underlying
-   * memory blocks is retained by the caller, which must guarantee that they
-   * remain valid until the handler is called.
-   *
-   * @param handler The handler to be called when the send operation completes.
-   * Copies will be made of the handler as required. The function signature of
-   * the handler must be:
-   * @code void handler(
-   *   const asio::error_code& error, // Result of operation.
-   *   std::size_t bytes_transferred           // Number of bytes sent.
-   * ); @endcode
-   * Regardless of whether the asynchronous operation completes immediately or
-   * not, the handler will not be invoked from within this function. Invocation
-   * of the handler will be performed in a manner equivalent to using
-   * asio::io_service::post().
-   *
-   * @note The async_send operation can only be used with a connected socket.
-   * Use the async_send_to function to send data on an unconnected datagram
-   * socket.
-   *
-   * @par Example
-   * To send a single data buffer use the @ref buffer function as follows:
-   * @code
-   * socket.async_send(asio::buffer(data, size), handler);
-   * @endcode
-   * See the @ref buffer documentation for information on sending multiple
-   * buffers in one go, and how to use it with arrays, boost::array or
-   * std::vector.
-   */
-  template <typename ConstBufferSequence, typename WriteHandler>
-  ASIO_INITFN_RESULT_TYPE(WriteHandler,
-      void (asio::error_code, std::size_t))
-  async_send(const ConstBufferSequence& buffers,
-      ASIO_MOVE_ARG(WriteHandler) handler)
-  {
-    // If you get an error on the following line it means that your handler does
-    // not meet the documented type requirements for a WriteHandler.
-    ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
-    return this->get_service().async_send(this->get_implementation(),
-        buffers, 0, ASIO_MOVE_CAST(WriteHandler)(handler));
-  }
-
-  /// Start an asynchronous send on a connected socket.
-  /**
-   * This function is used to asynchronously send data on the datagram socket.
-   * The function call always returns immediately.
-   *
-   * @param buffers One or more data buffers to be sent on the socket. Although
-   * the buffers object may be copied as necessary, ownership of the underlying
-   * memory blocks is retained by the caller, which must guarantee that they
-   * remain valid until the handler is called.
-   *
-   * @param flags Flags specifying how the send call is to be made.
-   *
-   * @param handler The handler to be called when the send operation completes.
-   * Copies will be made of the handler as required. The function signature of
-   * the handler must be:
-   * @code void handler(
-   *   const asio::error_code& error, // Result of operation.
-   *   std::size_t bytes_transferred           // Number of bytes sent.
-   * ); @endcode
-   * Regardless of whether the asynchronous operation completes immediately or
-   * not, the handler will not be invoked from within this function. Invocation
-   * of the handler will be performed in a manner equivalent to using
-   * asio::io_service::post().
-   *
-   * @note The async_send operation can only be used with a connected socket.
-   * Use the async_send_to function to send data on an unconnected datagram
-   * socket.
-   */
-  template <typename ConstBufferSequence, typename WriteHandler>
-  ASIO_INITFN_RESULT_TYPE(WriteHandler,
-      void (asio::error_code, std::size_t))
-  async_send(const ConstBufferSequence& buffers,
-      socket_base::message_flags flags,
-      ASIO_MOVE_ARG(WriteHandler) handler)
-  {
-    // If you get an error on the following line it means that your handler does
-    // not meet the documented type requirements for a WriteHandler.
-    ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
-    return this->get_service().async_send(this->get_implementation(),
-        buffers, flags, ASIO_MOVE_CAST(WriteHandler)(handler));
-  }
-
-  /// Send a datagram to the specified endpoint.
-  /**
-   * This function is used to send a datagram to the specified remote endpoint.
-   * The function call will block until the data has been sent successfully or
-   * an error occurs.
-   *
-   * @param buffers One or more data buffers to be sent to the remote endpoint.
-   *
-   * @param destination The remote endpoint to which the data will be sent.
-   *
-   * @returns The number of bytes sent.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @par Example
-   * To send a single data buffer use the @ref buffer function as follows:
-   * @code
-   * asio::ip::udp::endpoint destination(
-   *     asio::ip::address::from_string("1.2.3.4"), 12345);
-   * socket.send_to(asio::buffer(data, size), destination);
-   * @endcode
-   * See the @ref buffer documentation for information on sending multiple
-   * buffers in one go, and how to use it with arrays, boost::array or
-   * std::vector.
-   */
-  template <typename ConstBufferSequence>
-  std::size_t send_to(const ConstBufferSequence& buffers,
-      const endpoint_type& destination)
-  {
-    asio::error_code ec;
-    std::size_t s = this->get_service().send_to(
-        this->get_implementation(), buffers, destination, 0, ec);
-    asio::detail::throw_error(ec, "send_to");
-    return s;
-  }
-
-  /// Send a datagram to the specified endpoint.
-  /**
-   * This function is used to send a datagram to the specified remote endpoint.
-   * The function call will block until the data has been sent successfully or
-   * an error occurs.
-   *
-   * @param buffers One or more data buffers to be sent to the remote endpoint.
-   *
-   * @param destination The remote endpoint to which the data will be sent.
-   *
-   * @param flags Flags specifying how the send call is to be made.
-   *
-   * @returns The number of bytes sent.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  template <typename ConstBufferSequence>
-  std::size_t send_to(const ConstBufferSequence& buffers,
-      const endpoint_type& destination, socket_base::message_flags flags)
-  {
-    asio::error_code ec;
-    std::size_t s = this->get_service().send_to(
-        this->get_implementation(), buffers, destination, flags, ec);
-    asio::detail::throw_error(ec, "send_to");
-    return s;
-  }
-
-  /// Send a datagram to the specified endpoint.
-  /**
-   * This function is used to send a datagram to the specified remote endpoint.
-   * The function call will block until the data has been sent successfully or
-   * an error occurs.
-   *
-   * @param buffers One or more data buffers to be sent to the remote endpoint.
-   *
-   * @param destination The remote endpoint to which the data will be sent.
-   *
-   * @param flags Flags specifying how the send call is to be made.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @returns The number of bytes sent.
-   */
-  template <typename ConstBufferSequence>
-  std::size_t send_to(const ConstBufferSequence& buffers,
-      const endpoint_type& destination, socket_base::message_flags flags,
-      asio::error_code& ec)
-  {
-    return this->get_service().send_to(this->get_implementation(),
-        buffers, destination, flags, ec);
-  }
-
-  /// Start an asynchronous send.
-  /**
-   * This function is used to asynchronously send a datagram to the specified
-   * remote endpoint. The function call always returns immediately.
-   *
-   * @param buffers One or more data buffers to be sent to the remote endpoint.
-   * Although the buffers object may be copied as necessary, ownership of the
-   * underlying memory blocks is retained by the caller, which must guarantee
-   * that they remain valid until the handler is called.
-   *
-   * @param destination The remote endpoint to which the data will be sent.
-   * Copies will be made of the endpoint as required.
-   *
-   * @param handler The handler to be called when the send operation completes.
-   * Copies will be made of the handler as required. The function signature of
-   * the handler must be:
-   * @code void handler(
-   *   const asio::error_code& error, // Result of operation.
-   *   std::size_t bytes_transferred           // Number of bytes sent.
-   * ); @endcode
-   * Regardless of whether the asynchronous operation completes immediately or
-   * not, the handler will not be invoked from within this function. Invocation
-   * of the handler will be performed in a manner equivalent to using
-   * asio::io_service::post().
-   *
-   * @par Example
-   * To send a single data buffer use the @ref buffer function as follows:
-   * @code
-   * asio::ip::udp::endpoint destination(
-   *     asio::ip::address::from_string("1.2.3.4"), 12345);
-   * socket.async_send_to(
-   *     asio::buffer(data, size), destination, handler);
-   * @endcode
-   * See the @ref buffer documentation for information on sending multiple
-   * buffers in one go, and how to use it with arrays, boost::array or
-   * std::vector.
-   */
-  template <typename ConstBufferSequence, typename WriteHandler>
-  ASIO_INITFN_RESULT_TYPE(WriteHandler,
-      void (asio::error_code, std::size_t))
-  async_send_to(const ConstBufferSequence& buffers,
-      const endpoint_type& destination,
-      ASIO_MOVE_ARG(WriteHandler) handler)
-  {
-    // If you get an error on the following line it means that your handler does
-    // not meet the documented type requirements for a WriteHandler.
-    ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
-    return this->get_service().async_send_to(
-        this->get_implementation(), buffers, destination, 0,
-        ASIO_MOVE_CAST(WriteHandler)(handler));
-  }
-
-  /// Start an asynchronous send.
-  /**
-   * This function is used to asynchronously send a datagram to the specified
-   * remote endpoint. The function call always returns immediately.
-   *
-   * @param buffers One or more data buffers to be sent to the remote endpoint.
-   * Although the buffers object may be copied as necessary, ownership of the
-   * underlying memory blocks is retained by the caller, which must guarantee
-   * that they remain valid until the handler is called.
-   *
-   * @param flags Flags specifying how the send call is to be made.
-   *
-   * @param destination The remote endpoint to which the data will be sent.
-   * Copies will be made of the endpoint as required.
-   *
-   * @param handler The handler to be called when the send operation completes.
-   * Copies will be made of the handler as required. The function signature of
-   * the handler must be:
-   * @code void handler(
-   *   const asio::error_code& error, // Result of operation.
-   *   std::size_t bytes_transferred           // Number of bytes sent.
-   * ); @endcode
-   * Regardless of whether the asynchronous operation completes immediately or
-   * not, the handler will not be invoked from within this function. Invocation
-   * of the handler will be performed in a manner equivalent to using
-   * asio::io_service::post().
-   */
-  template <typename ConstBufferSequence, typename WriteHandler>
-  ASIO_INITFN_RESULT_TYPE(WriteHandler,
-      void (asio::error_code, std::size_t))
-  async_send_to(const ConstBufferSequence& buffers,
-      const endpoint_type& destination, socket_base::message_flags flags,
-      ASIO_MOVE_ARG(WriteHandler) handler)
-  {
-    // If you get an error on the following line it means that your handler does
-    // not meet the documented type requirements for a WriteHandler.
-    ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
-    return this->get_service().async_send_to(
-        this->get_implementation(), buffers, destination, flags,
-        ASIO_MOVE_CAST(WriteHandler)(handler));
-  }
-
-  /// Receive some data on a connected socket.
-  /**
-   * This function is used to receive data on the datagram socket. The function
-   * call will block until data has been received successfully or an error
-   * occurs.
-   *
-   * @param buffers One or more buffers into which the data will be received.
-   *
-   * @returns The number of bytes received.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @note The receive operation can only be used with a connected socket. Use
-   * the receive_from function to receive data on an unconnected datagram
-   * socket.
-   *
-   * @par Example
-   * To receive into a single data buffer use the @ref buffer function as
-   * follows:
-   * @code socket.receive(asio::buffer(data, size)); @endcode
-   * See the @ref buffer documentation for information on receiving into
-   * multiple buffers in one go, and how to use it with arrays, boost::array or
-   * std::vector.
-   */
-  template <typename MutableBufferSequence>
-  std::size_t receive(const MutableBufferSequence& buffers)
-  {
-    asio::error_code ec;
-    std::size_t s = this->get_service().receive(
-        this->get_implementation(), buffers, 0, ec);
-    asio::detail::throw_error(ec, "receive");
-    return s;
-  }
-
-  /// Receive some data on a connected socket.
-  /**
-   * This function is used to receive data on the datagram socket. The function
-   * call will block until data has been received successfully or an error
-   * occurs.
-   *
-   * @param buffers One or more buffers into which the data will be received.
-   *
-   * @param flags Flags specifying how the receive call is to be made.
-   *
-   * @returns The number of bytes received.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @note The receive operation can only be used with a connected socket. Use
-   * the receive_from function to receive data on an unconnected datagram
-   * socket.
-   */
-  template <typename MutableBufferSequence>
-  std::size_t receive(const MutableBufferSequence& buffers,
-      socket_base::message_flags flags)
-  {
-    asio::error_code ec;
-    std::size_t s = this->get_service().receive(
-        this->get_implementation(), buffers, flags, ec);
-    asio::detail::throw_error(ec, "receive");
-    return s;
-  }
-
-  /// Receive some data on a connected socket.
-  /**
-   * This function is used to receive data on the datagram socket. The function
-   * call will block until data has been received successfully or an error
-   * occurs.
-   *
-   * @param buffers One or more buffers into which the data will be received.
-   *
-   * @param flags Flags specifying how the receive call is to be made.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @returns The number of bytes received.
-   *
-   * @note The receive operation can only be used with a connected socket. Use
-   * the receive_from function to receive data on an unconnected datagram
-   * socket.
-   */
-  template <typename MutableBufferSequence>
-  std::size_t receive(const MutableBufferSequence& buffers,
-      socket_base::message_flags flags, asio::error_code& ec)
-  {
-    return this->get_service().receive(
-        this->get_implementation(), buffers, flags, ec);
-  }
-
-  /// Start an asynchronous receive on a connected socket.
-  /**
-   * This function is used to asynchronously receive data from the datagram
-   * socket. The function call always returns immediately.
-   *
-   * @param buffers One or more buffers into which the data will be received.
-   * Although the buffers object may be copied as necessary, ownership of the
-   * underlying memory blocks is retained by the caller, which must guarantee
-   * that they remain valid until the handler is called.
-   *
-   * @param handler The handler to be called when the receive operation
-   * completes. Copies will be made of the handler as required. The function
-   * signature of the handler must be:
-   * @code void handler(
-   *   const asio::error_code& error, // Result of operation.
-   *   std::size_t bytes_transferred           // Number of bytes received.
-   * ); @endcode
-   * Regardless of whether the asynchronous operation completes immediately or
-   * not, the handler will not be invoked from within this function. Invocation
-   * of the handler will be performed in a manner equivalent to using
-   * asio::io_service::post().
-   *
-   * @note The async_receive operation can only be used with a connected socket.
-   * Use the async_receive_from function to receive data on an unconnected
-   * datagram socket.
-   *
-   * @par Example
-   * To receive into a single data buffer use the @ref buffer function as
-   * follows:
-   * @code
-   * socket.async_receive(asio::buffer(data, size), handler);
-   * @endcode
-   * See the @ref buffer documentation for information on receiving into
-   * multiple buffers in one go, and how to use it with arrays, boost::array or
-   * std::vector.
-   */
-  template <typename MutableBufferSequence, typename ReadHandler>
-  ASIO_INITFN_RESULT_TYPE(ReadHandler,
-      void (asio::error_code, std::size_t))
-  async_receive(const MutableBufferSequence& buffers,
-      ASIO_MOVE_ARG(ReadHandler) handler)
-  {
-    // If you get an error on the following line it means that your handler does
-    // not meet the documented type requirements for a ReadHandler.
-    ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
-    return this->get_service().async_receive(this->get_implementation(),
-        buffers, 0, ASIO_MOVE_CAST(ReadHandler)(handler));
-  }
-
-  /// Start an asynchronous receive on a connected socket.
-  /**
-   * This function is used to asynchronously receive data from the datagram
-   * socket. The function call always returns immediately.
-   *
-   * @param buffers One or more buffers into which the data will be received.
-   * Although the buffers object may be copied as necessary, ownership of the
-   * underlying memory blocks is retained by the caller, which must guarantee
-   * that they remain valid until the handler is called.
-   *
-   * @param flags Flags specifying how the receive call is to be made.
-   *
-   * @param handler The handler to be called when the receive operation
-   * completes. Copies will be made of the handler as required. The function
-   * signature of the handler must be:
-   * @code void handler(
-   *   const asio::error_code& error, // Result of operation.
-   *   std::size_t bytes_transferred           // Number of bytes received.
-   * ); @endcode
-   * Regardless of whether the asynchronous operation completes immediately or
-   * not, the handler will not be invoked from within this function. Invocation
-   * of the handler will be performed in a manner equivalent to using
-   * asio::io_service::post().
-   *
-   * @note The async_receive operation can only be used with a connected socket.
-   * Use the async_receive_from function to receive data on an unconnected
-   * datagram socket.
-   */
-  template <typename MutableBufferSequence, typename ReadHandler>
-  ASIO_INITFN_RESULT_TYPE(ReadHandler,
-      void (asio::error_code, std::size_t))
-  async_receive(const MutableBufferSequence& buffers,
-      socket_base::message_flags flags,
-      ASIO_MOVE_ARG(ReadHandler) handler)
-  {
-    // If you get an error on the following line it means that your handler does
-    // not meet the documented type requirements for a ReadHandler.
-    ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
-    return this->get_service().async_receive(this->get_implementation(),
-        buffers, flags, ASIO_MOVE_CAST(ReadHandler)(handler));
-  }
-
-  /// Receive a datagram with the endpoint of the sender.
-  /**
-   * This function is used to receive a datagram. The function call will block
-   * until data has been received successfully or an error occurs.
-   *
-   * @param buffers One or more buffers into which the data will be received.
-   *
-   * @param sender_endpoint An endpoint object that receives the endpoint of
-   * the remote sender of the datagram.
-   *
-   * @returns The number of bytes received.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @par Example
-   * To receive into a single data buffer use the @ref buffer function as
-   * follows:
-   * @code
-   * asio::ip::udp::endpoint sender_endpoint;
-   * socket.receive_from(
-   *     asio::buffer(data, size), sender_endpoint);
-   * @endcode
-   * See the @ref buffer documentation for information on receiving into
-   * multiple buffers in one go, and how to use it with arrays, boost::array or
-   * std::vector.
-   */
-  template <typename MutableBufferSequence>
-  std::size_t receive_from(const MutableBufferSequence& buffers,
-      endpoint_type& sender_endpoint)
-  {
-    asio::error_code ec;
-    std::size_t s = this->get_service().receive_from(
-        this->get_implementation(), buffers, sender_endpoint, 0, ec);
-    asio::detail::throw_error(ec, "receive_from");
-    return s;
-  }
-  
-  /// Receive a datagram with the endpoint of the sender.
-  /**
-   * This function is used to receive a datagram. The function call will block
-   * until data has been received successfully or an error occurs.
-   *
-   * @param buffers One or more buffers into which the data will be received.
-   *
-   * @param sender_endpoint An endpoint object that receives the endpoint of
-   * the remote sender of the datagram.
-   *
-   * @param flags Flags specifying how the receive call is to be made.
-   *
-   * @returns The number of bytes received.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  template <typename MutableBufferSequence>
-  std::size_t receive_from(const MutableBufferSequence& buffers,
-      endpoint_type& sender_endpoint, socket_base::message_flags flags)
-  {
-    asio::error_code ec;
-    std::size_t s = this->get_service().receive_from(
-        this->get_implementation(), buffers, sender_endpoint, flags, ec);
-    asio::detail::throw_error(ec, "receive_from");
-    return s;
-  }
-  
-  /// Receive a datagram with the endpoint of the sender.
-  /**
-   * This function is used to receive a datagram. The function call will block
-   * until data has been received successfully or an error occurs.
-   *
-   * @param buffers One or more buffers into which the data will be received.
-   *
-   * @param sender_endpoint An endpoint object that receives the endpoint of
-   * the remote sender of the datagram.
-   *
-   * @param flags Flags specifying how the receive call is to be made.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @returns The number of bytes received.
-   */
-  template <typename MutableBufferSequence>
-  std::size_t receive_from(const MutableBufferSequence& buffers,
-      endpoint_type& sender_endpoint, socket_base::message_flags flags,
-      asio::error_code& ec)
-  {
-    return this->get_service().receive_from(this->get_implementation(),
-        buffers, sender_endpoint, flags, ec);
-  }
-
-  /// Start an asynchronous receive.
-  /**
-   * This function is used to asynchronously receive a datagram. The function
-   * call always returns immediately.
-   *
-   * @param buffers One or more buffers into which the data will be received.
-   * Although the buffers object may be copied as necessary, ownership of the
-   * underlying memory blocks is retained by the caller, which must guarantee
-   * that they remain valid until the handler is called.
-   *
-   * @param sender_endpoint An endpoint object that receives the endpoint of
-   * the remote sender of the datagram. Ownership of the sender_endpoint object
-   * is retained by the caller, which must guarantee that it is valid until the
-   * handler is called.
-   *
-   * @param handler The handler to be called when the receive operation
-   * completes. Copies will be made of the handler as required. The function
-   * signature of the handler must be:
-   * @code void handler(
-   *   const asio::error_code& error, // Result of operation.
-   *   std::size_t bytes_transferred           // Number of bytes received.
-   * ); @endcode
-   * Regardless of whether the asynchronous operation completes immediately or
-   * not, the handler will not be invoked from within this function. Invocation
-   * of the handler will be performed in a manner equivalent to using
-   * asio::io_service::post().
-   *
-   * @par Example
-   * To receive into a single data buffer use the @ref buffer function as
-   * follows:
-   * @code socket.async_receive_from(
-   *     asio::buffer(data, size), sender_endpoint, handler); @endcode
-   * See the @ref buffer documentation for information on receiving into
-   * multiple buffers in one go, and how to use it with arrays, boost::array or
-   * std::vector.
-   */
-  template <typename MutableBufferSequence, typename ReadHandler>
-  ASIO_INITFN_RESULT_TYPE(ReadHandler,
-      void (asio::error_code, std::size_t))
-  async_receive_from(const MutableBufferSequence& buffers,
-      endpoint_type& sender_endpoint,
-      ASIO_MOVE_ARG(ReadHandler) handler)
-  {
-    // If you get an error on the following line it means that your handler does
-    // not meet the documented type requirements for a ReadHandler.
-    ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
-    return this->get_service().async_receive_from(
-        this->get_implementation(), buffers, sender_endpoint, 0,
-        ASIO_MOVE_CAST(ReadHandler)(handler));
-  }
-
-  /// Start an asynchronous receive.
-  /**
-   * This function is used to asynchronously receive a datagram. The function
-   * call always returns immediately.
-   *
-   * @param buffers One or more buffers into which the data will be received.
-   * Although the buffers object may be copied as necessary, ownership of the
-   * underlying memory blocks is retained by the caller, which must guarantee
-   * that they remain valid until the handler is called.
-   *
-   * @param sender_endpoint An endpoint object that receives the endpoint of
-   * the remote sender of the datagram. Ownership of the sender_endpoint object
-   * is retained by the caller, which must guarantee that it is valid until the
-   * handler is called.
-   *
-   * @param flags Flags specifying how the receive call is to be made.
-   *
-   * @param handler The handler to be called when the receive operation
-   * completes. Copies will be made of the handler as required. The function
-   * signature of the handler must be:
-   * @code void handler(
-   *   const asio::error_code& error, // Result of operation.
-   *   std::size_t bytes_transferred           // Number of bytes received.
-   * ); @endcode
-   * Regardless of whether the asynchronous operation completes immediately or
-   * not, the handler will not be invoked from within this function. Invocation
-   * of the handler will be performed in a manner equivalent to using
-   * asio::io_service::post().
-   */
-  template <typename MutableBufferSequence, typename ReadHandler>
-  ASIO_INITFN_RESULT_TYPE(ReadHandler,
-      void (asio::error_code, std::size_t))
-  async_receive_from(const MutableBufferSequence& buffers,
-      endpoint_type& sender_endpoint, socket_base::message_flags flags,
-      ASIO_MOVE_ARG(ReadHandler) handler)
-  {
-    // If you get an error on the following line it means that your handler does
-    // not meet the documented type requirements for a ReadHandler.
-    ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
-    return this->get_service().async_receive_from(
-        this->get_implementation(), buffers, sender_endpoint, flags,
-        ASIO_MOVE_CAST(ReadHandler)(handler));
-  }
-};
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_BASIC_DATAGRAM_SOCKET_HPP
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_deadline_timer.hpp b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_deadline_timer.hpp
deleted file mode 100644
index d0fc371..0000000
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_deadline_timer.hpp
+++ /dev/null
@@ -1,520 +0,0 @@
-//
-// basic_deadline_timer.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef ASIO_BASIC_DEADLINE_TIMER_HPP
-#define ASIO_BASIC_DEADLINE_TIMER_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_BOOST_DATE_TIME) \
-  || defined(ASIO_CPP11_DATE_TIME) \
-  || defined(GENERATING_DOCUMENTATION)
-
-#include <cstddef>
-#include "asio/basic_io_object.hpp"
-#include "asio/deadline_timer_service.hpp"
-#include "asio/detail/handler_type_requirements.hpp"
-#include "asio/detail/throw_error.hpp"
-#include "asio/error.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-/// Provides waitable timer functionality.
-/**
- * The basic_deadline_timer class template provides the ability to perform a
- * blocking or asynchronous wait for a timer to expire.
- *
- * A deadline timer is always in one of two states: "expired" or "not expired".
- * If the wait() or async_wait() function is called on an expired timer, the
- * wait operation will complete immediately.
- *
- * Most applications will use the asio::deadline_timer typedef.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- *
- * @par Examples
- * Performing a blocking wait:
- * @code
- * // Construct a timer without setting an expiry time.
- * asio::deadline_timer timer(io_service);
- *
- * // Set an expiry time relative to now.
- * timer.expires_from_now(boost::posix_time::seconds(5));
- *
- * // Wait for the timer to expire.
- * timer.wait();
- * @endcode
- *
- * @par 
- * Performing an asynchronous wait:
- * @code
- * void handler(const asio::error_code& error)
- * {
- *   if (!error)
- *   {
- *     // Timer expired.
- *   }
- * }
- *
- * ...
- *
- * // Construct a timer with an absolute expiry time.
- * asio::deadline_timer timer(io_service,
- *     boost::posix_time::time_from_string("2005-12-07 23:59:59.000"));
- *
- * // Start an asynchronous wait.
- * timer.async_wait(handler);
- * @endcode
- *
- * @par Changing an active deadline_timer's expiry time
- *
- * Changing the expiry time of a timer while there are pending asynchronous
- * waits causes those wait operations to be cancelled. To ensure that the action
- * associated with the timer is performed only once, use something like this:
- * used:
- *
- * @code
- * void on_some_event()
- * {
- *   if (my_timer.expires_from_now(seconds(5)) > 0)
- *   {
- *     // We managed to cancel the timer. Start new asynchronous wait.
- *     my_timer.async_wait(on_timeout);
- *   }
- *   else
- *   {
- *     // Too late, timer has already expired!
- *   }
- * }
- *
- * void on_timeout(const asio::error_code& e)
- * {
- *   if (e != asio::error::operation_aborted)
- *   {
- *     // Timer was not cancelled, take necessary action.
- *   }
- * }
- * @endcode
- *
- * @li The asio::basic_deadline_timer::expires_from_now() function
- * cancels any pending asynchronous waits, and returns the number of
- * asynchronous waits that were cancelled. If it returns 0 then you were too
- * late and the wait handler has already been executed, or will soon be
- * executed. If it returns 1 then the wait handler was successfully cancelled.
- *
- * @li If a wait handler is cancelled, the asio::error_code passed to
- * it contains the value asio::error::operation_aborted.
- */
-template <typename Time,
-    typename TimeTraits = asio::time_traits<Time>,
-    typename TimerService = deadline_timer_service<Time, TimeTraits> >
-class basic_deadline_timer
-  : public basic_io_object<TimerService>
-{
-public:
-  /// The time traits type.
-  typedef TimeTraits traits_type;
-
-  /// The time type.
-  typedef typename traits_type::time_type time_type;
-
-  /// The duration type.
-  typedef typename traits_type::duration_type duration_type;
-
-  /// Constructor.
-  /**
-   * This constructor creates a timer without setting an expiry time. The
-   * expires_at() or expires_from_now() functions must be called to set an
-   * expiry time before the timer can be waited on.
-   *
-   * @param io_service The io_service object that the timer will use to dispatch
-   * handlers for any asynchronous operations performed on the timer.
-   */
-  explicit basic_deadline_timer(asio::io_service& io_service)
-    : basic_io_object<TimerService>(io_service)
-  {
-  }
-
-  /// Constructor to set a particular expiry time as an absolute time.
-  /**
-   * This constructor creates a timer and sets the expiry time.
-   *
-   * @param io_service The io_service object that the timer will use to dispatch
-   * handlers for any asynchronous operations performed on the timer.
-   *
-   * @param expiry_time The expiry time to be used for the timer, expressed
-   * as an absolute time.
-   */
-  basic_deadline_timer(asio::io_service& io_service,
-      const time_type& expiry_time)
-    : basic_io_object<TimerService>(io_service)
-  {
-    asio::error_code ec;
-    this->service.expires_at(this->implementation, expiry_time, ec);
-    asio::detail::throw_error(ec, "expires_at");
-  }
-
-  /// Constructor to set a particular expiry time relative to now.
-  /**
-   * This constructor creates a timer and sets the expiry time.
-   *
-   * @param io_service The io_service object that the timer will use to dispatch
-   * handlers for any asynchronous operations performed on the timer.
-   *
-   * @param expiry_time The expiry time to be used for the timer, relative to
-   * now.
-   */
-  basic_deadline_timer(asio::io_service& io_service,
-      const duration_type& expiry_time)
-    : basic_io_object<TimerService>(io_service)
-  {
-    asio::error_code ec;
-    this->service.expires_from_now(this->implementation, expiry_time, ec);
-    asio::detail::throw_error(ec, "expires_from_now");
-  }
-
-  /// Cancel any asynchronous operations that are waiting on the timer.
-  /**
-   * This function forces the completion of any pending asynchronous wait
-   * operations against the timer. The handler for each cancelled operation will
-   * be invoked with the asio::error::operation_aborted error code.
-   *
-   * Cancelling the timer does not change the expiry time.
-   *
-   * @return The number of asynchronous operations that were cancelled.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @note If the timer has already expired when cancel() is called, then the
-   * handlers for asynchronous wait operations will:
-   *
-   * @li have already been invoked; or
-   *
-   * @li have been queued for invocation in the near future.
-   *
-   * These handlers can no longer be cancelled, and therefore are passed an
-   * error code that indicates the successful completion of the wait operation.
-   */
-  std::size_t cancel()
-  {
-    asio::error_code ec;
-    std::size_t s = this->service.cancel(this->implementation, ec);
-    asio::detail::throw_error(ec, "cancel");
-    return s;
-  }
-
-  /// Cancel any asynchronous operations that are waiting on the timer.
-  /**
-   * This function forces the completion of any pending asynchronous wait
-   * operations against the timer. The handler for each cancelled operation will
-   * be invoked with the asio::error::operation_aborted error code.
-   *
-   * Cancelling the timer does not change the expiry time.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @return The number of asynchronous operations that were cancelled.
-   *
-   * @note If the timer has already expired when cancel() is called, then the
-   * handlers for asynchronous wait operations will:
-   *
-   * @li have already been invoked; or
-   *
-   * @li have been queued for invocation in the near future.
-   *
-   * These handlers can no longer be cancelled, and therefore are passed an
-   * error code that indicates the successful completion of the wait operation.
-   */
-  std::size_t cancel(asio::error_code& ec)
-  {
-    return this->service.cancel(this->implementation, ec);
-  }
-
-  /// Cancels one asynchronous operation that is waiting on the timer.
-  /**
-   * This function forces the completion of one pending asynchronous wait
-   * operation against the timer. Handlers are cancelled in FIFO order. The
-   * handler for the cancelled operation will be invoked with the
-   * asio::error::operation_aborted error code.
-   *
-   * Cancelling the timer does not change the expiry time.
-   *
-   * @return The number of asynchronous operations that were cancelled. That is,
-   * either 0 or 1.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @note If the timer has already expired when cancel_one() is called, then
-   * the handlers for asynchronous wait operations will:
-   *
-   * @li have already been invoked; or
-   *
-   * @li have been queued for invocation in the near future.
-   *
-   * These handlers can no longer be cancelled, and therefore are passed an
-   * error code that indicates the successful completion of the wait operation.
-   */
-  std::size_t cancel_one()
-  {
-    asio::error_code ec;
-    std::size_t s = this->service.cancel_one(this->implementation, ec);
-    asio::detail::throw_error(ec, "cancel_one");
-    return s;
-  }
-
-  /// Cancels one asynchronous operation that is waiting on the timer.
-  /**
-   * This function forces the completion of one pending asynchronous wait
-   * operation against the timer. Handlers are cancelled in FIFO order. The
-   * handler for the cancelled operation will be invoked with the
-   * asio::error::operation_aborted error code.
-   *
-   * Cancelling the timer does not change the expiry time.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @return The number of asynchronous operations that were cancelled. That is,
-   * either 0 or 1.
-   *
-   * @note If the timer has already expired when cancel_one() is called, then
-   * the handlers for asynchronous wait operations will:
-   *
-   * @li have already been invoked; or
-   *
-   * @li have been queued for invocation in the near future.
-   *
-   * These handlers can no longer be cancelled, and therefore are passed an
-   * error code that indicates the successful completion of the wait operation.
-   */
-  std::size_t cancel_one(asio::error_code& ec)
-  {
-    return this->service.cancel_one(this->implementation, ec);
-  }
-
-  /// Get the timer's expiry time as an absolute time.
-  /**
-   * This function may be used to obtain the timer's current expiry time.
-   * Whether the timer has expired or not does not affect this value.
-   */
-  time_type expires_at() const
-  {
-    return this->service.expires_at(this->implementation);
-  }
-
-  /// Set the timer's expiry time as an absolute time.
-  /**
-   * This function sets the expiry time. Any pending asynchronous wait
-   * operations will be cancelled. The handler for each cancelled operation will
-   * be invoked with the asio::error::operation_aborted error code.
-   *
-   * @param expiry_time The expiry time to be used for the timer.
-   *
-   * @return The number of asynchronous operations that were cancelled.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @note If the timer has already expired when expires_at() is called, then
-   * the handlers for asynchronous wait operations will:
-   *
-   * @li have already been invoked; or
-   *
-   * @li have been queued for invocation in the near future.
-   *
-   * These handlers can no longer be cancelled, and therefore are passed an
-   * error code that indicates the successful completion of the wait operation.
-   */
-  std::size_t expires_at(const time_type& expiry_time)
-  {
-    asio::error_code ec;
-    std::size_t s = this->service.expires_at(
-        this->implementation, expiry_time, ec);
-    asio::detail::throw_error(ec, "expires_at");
-    return s;
-  }
-
-  /// Set the timer's expiry time as an absolute time.
-  /**
-   * This function sets the expiry time. Any pending asynchronous wait
-   * operations will be cancelled. The handler for each cancelled operation will
-   * be invoked with the asio::error::operation_aborted error code.
-   *
-   * @param expiry_time The expiry time to be used for the timer.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @return The number of asynchronous operations that were cancelled.
-   *
-   * @note If the timer has already expired when expires_at() is called, then
-   * the handlers for asynchronous wait operations will:
-   *
-   * @li have already been invoked; or
-   *
-   * @li have been queued for invocation in the near future.
-   *
-   * These handlers can no longer be cancelled, and therefore are passed an
-   * error code that indicates the successful completion of the wait operation.
-   */
-  std::size_t expires_at(const time_type& expiry_time,
-      asio::error_code& ec)
-  {
-    return this->service.expires_at(this->implementation, expiry_time, ec);
-  }
-
-  /// Get the timer's expiry time relative to now.
-  /**
-   * This function may be used to obtain the timer's current expiry time.
-   * Whether the timer has expired or not does not affect this value.
-   */
-  duration_type expires_from_now() const
-  {
-    return this->service.expires_from_now(this->implementation);
-  }
-
-  /// Set the timer's expiry time relative to now.
-  /**
-   * This function sets the expiry time. Any pending asynchronous wait
-   * operations will be cancelled. The handler for each cancelled operation will
-   * be invoked with the asio::error::operation_aborted error code.
-   *
-   * @param expiry_time The expiry time to be used for the timer.
-   *
-   * @return The number of asynchronous operations that were cancelled.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @note If the timer has already expired when expires_from_now() is called,
-   * then the handlers for asynchronous wait operations will:
-   *
-   * @li have already been invoked; or
-   *
-   * @li have been queued for invocation in the near future.
-   *
-   * These handlers can no longer be cancelled, and therefore are passed an
-   * error code that indicates the successful completion of the wait operation.
-   */
-  std::size_t expires_from_now(const duration_type& expiry_time)
-  {
-    asio::error_code ec;
-    std::size_t s = this->service.expires_from_now(
-        this->implementation, expiry_time, ec);
-    asio::detail::throw_error(ec, "expires_from_now");
-    return s;
-  }
-
-  /// Set the timer's expiry time relative to now.
-  /**
-   * This function sets the expiry time. Any pending asynchronous wait
-   * operations will be cancelled. The handler for each cancelled operation will
-   * be invoked with the asio::error::operation_aborted error code.
-   *
-   * @param expiry_time The expiry time to be used for the timer.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @return The number of asynchronous operations that were cancelled.
-   *
-   * @note If the timer has already expired when expires_from_now() is called,
-   * then the handlers for asynchronous wait operations will:
-   *
-   * @li have already been invoked; or
-   *
-   * @li have been queued for invocation in the near future.
-   *
-   * These handlers can no longer be cancelled, and therefore are passed an
-   * error code that indicates the successful completion of the wait operation.
-   */
-  std::size_t expires_from_now(const duration_type& expiry_time,
-      asio::error_code& ec)
-  {
-    return this->service.expires_from_now(
-        this->implementation, expiry_time, ec);
-  }
-
-  /// Perform a blocking wait on the timer.
-  /**
-   * This function is used to wait for the timer to expire. This function
-   * blocks and does not return until the timer has expired.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  void wait()
-  {
-    asio::error_code ec;
-    this->service.wait(this->implementation, ec);
-    asio::detail::throw_error(ec, "wait");
-  }
-
-  /// Perform a blocking wait on the timer.
-  /**
-   * This function is used to wait for the timer to expire. This function
-   * blocks and does not return until the timer has expired.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   */
-  void wait(asio::error_code& ec)
-  {
-    this->service.wait(this->implementation, ec);
-  }
-
-  /// Start an asynchronous wait on the timer.
-  /**
-   * This function may be used to initiate an asynchronous wait against the
-   * timer. It always returns immediately.
-   *
-   * For each call to async_wait(), the supplied handler will be called exactly
-   * once. The handler will be called when:
-   *
-   * @li The timer has expired.
-   *
-   * @li The timer was cancelled, in which case the handler is passed the error
-   * code asio::error::operation_aborted.
-   *
-   * @param handler The handler to be called when the timer expires. Copies
-   * will be made of the handler as required. The function signature of the
-   * handler must be:
-   * @code void handler(
-   *   const asio::error_code& error // Result of operation.
-   * ); @endcode
-   * Regardless of whether the asynchronous operation completes immediately or
-   * not, the handler will not be invoked from within this function. Invocation
-   * of the handler will be performed in a manner equivalent to using
-   * asio::io_service::post().
-   */
-  template <typename WaitHandler>
-  ASIO_INITFN_RESULT_TYPE(WaitHandler,
-      void (asio::error_code))
-  async_wait(ASIO_MOVE_ARG(WaitHandler) handler)
-  {
-    // If you get an error on the following line it means that your handler does
-    // not meet the documented type requirements for a WaitHandler.
-    ASIO_WAIT_HANDLER_CHECK(WaitHandler, handler) type_check;
-
-    return this->service.async_wait(this->implementation,
-        ASIO_MOVE_CAST(WaitHandler)(handler));
-  }
-};
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
-       // || defined(ASIO_CPP11_DATE_TIME)
-       // || defined(GENERATING_DOCUMENTATION)
-
-#endif // ASIO_BASIC_DEADLINE_TIMER_HPP
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_io_object.hpp b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_io_object.hpp
deleted file mode 100644
index 6154d92..0000000
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_io_object.hpp
+++ /dev/null
@@ -1,240 +0,0 @@
-//
-// basic_io_object.hpp
-// ~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef ASIO_BASIC_IO_OBJECT_HPP
-#define ASIO_BASIC_IO_OBJECT_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/io_service.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-#if defined(ASIO_HAS_MOVE)
-namespace detail
-{
-  // Type trait used to determine whether a service supports move.
-  template <typename IoObjectService>
-  class service_has_move
-  {
-  private:
-    typedef IoObjectService service_type;
-    typedef typename service_type::implementation_type implementation_type;
-
-    template <typename T, typename U>
-    static auto eval(T* t, U* u) -> decltype(t->move_construct(*u, *u), char());
-    static char (&eval(...))[2];
-
-  public:
-    static const bool value =
-      sizeof(service_has_move::eval(
-        static_cast<service_type*>(0),
-        static_cast<implementation_type*>(0))) == 1;
-  };
-}
-#endif // defined(ASIO_HAS_MOVE)
-
-/// Base class for all I/O objects.
-/**
- * @note All I/O objects are non-copyable. However, when using C++0x, certain
- * I/O objects do support move construction and move assignment.
- */
-#if !defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-template <typename IoObjectService>
-#else
-template <typename IoObjectService,
-    bool Movable = detail::service_has_move<IoObjectService>::value>
-#endif
-class basic_io_object
-{
-public:
-  /// The type of the service that will be used to provide I/O operations.
-  typedef IoObjectService service_type;
-
-  /// The underlying implementation type of I/O object.
-  typedef typename service_type::implementation_type implementation_type;
-
-  /// Get the io_service associated with the object.
-  /**
-   * This function may be used to obtain the io_service object that the I/O
-   * object uses to dispatch handlers for asynchronous operations.
-   *
-   * @return A reference to the io_service object that the I/O object will use
-   * to dispatch handlers. Ownership is not transferred to the caller.
-   */
-  asio::io_service& get_io_service()
-  {
-    return service.get_io_service();
-  }
-
-protected:
-  /// Construct a basic_io_object.
-  /**
-   * Performs:
-   * @code get_service().construct(get_implementation()); @endcode
-   */
-  explicit basic_io_object(asio::io_service& io_service)
-    : service(asio::use_service<IoObjectService>(io_service))
-  {
-    service.construct(implementation);
-  }
-
-#if defined(GENERATING_DOCUMENTATION)
-  /// Move-construct a basic_io_object.
-  /**
-   * Performs:
-   * @code get_service().move_construct(
-   *     get_implementation(), other.get_implementation()); @endcode
-   *
-   * @note Available only for services that support movability,
-   */
-  basic_io_object(basic_io_object&& other);
-
-  /// Move-assign a basic_io_object.
-  /**
-   * Performs:
-   * @code get_service().move_assign(get_implementation(),
-   *     other.get_service(), other.get_implementation()); @endcode
-   *
-   * @note Available only for services that support movability,
-   */
-  basic_io_object& operator=(basic_io_object&& other);
-#endif // defined(GENERATING_DOCUMENTATION)
-
-  /// Protected destructor to prevent deletion through this type.
-  /**
-   * Performs:
-   * @code get_service().destroy(get_implementation()); @endcode
-   */
-  ~basic_io_object()
-  {
-    service.destroy(implementation);
-  }
-
-  /// Get the service associated with the I/O object.
-  service_type& get_service()
-  {
-    return service;
-  }
-
-  /// Get the service associated with the I/O object.
-  const service_type& get_service() const
-  {
-    return service;
-  }
-
-  /// (Deprecated: Use get_service().) The service associated with the I/O
-  /// object.
-  /**
-   * @note Available only for services that do not support movability.
-   */
-  service_type& service;
-
-  /// Get the underlying implementation of the I/O object.
-  implementation_type& get_implementation()
-  {
-    return implementation;
-  }
-
-  /// Get the underlying implementation of the I/O object.
-  const implementation_type& get_implementation() const
-  {
-    return implementation;
-  }
-
-  /// (Deprecated: Use get_implementation().) The underlying implementation of
-  /// the I/O object.
-  implementation_type implementation;
-
-private:
-  basic_io_object(const basic_io_object&);
-  basic_io_object& operator=(const basic_io_object&);
-};
-
-#if defined(ASIO_HAS_MOVE)
-// Specialisation for movable objects.
-template <typename IoObjectService>
-class basic_io_object<IoObjectService, true>
-{
-public:
-  typedef IoObjectService service_type;
-  typedef typename service_type::implementation_type implementation_type;
-
-  asio::io_service& get_io_service()
-  {
-    return service_->get_io_service();
-  }
-
-protected:
-  explicit basic_io_object(asio::io_service& io_service)
-    : service_(&asio::use_service<IoObjectService>(io_service))
-  {
-    service_->construct(implementation);
-  }
-
-  basic_io_object(basic_io_object&& other)
-    : service_(&other.get_service())
-  {
-    service_->move_construct(implementation, other.implementation);
-  }
-
-  ~basic_io_object()
-  {
-    service_->destroy(implementation);
-  }
-
-  basic_io_object& operator=(basic_io_object&& other)
-  {
-    service_->move_assign(implementation,
-        *other.service_, other.implementation);
-    service_ = other.service_;
-    return *this;
-  }
-
-  service_type& get_service()
-  {
-    return *service_;
-  }
-
-  const service_type& get_service() const
-  {
-    return *service_;
-  }
-
-  implementation_type& get_implementation()
-  {
-    return implementation;
-  }
-
-  const implementation_type& get_implementation() const
-  {
-    return implementation;
-  }
-
-  implementation_type implementation;
-
-private:
-  basic_io_object(const basic_io_object&);
-  void operator=(const basic_io_object&);
-
-  IoObjectService* service_;
-};
-#endif // defined(ASIO_HAS_MOVE)
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_BASIC_IO_OBJECT_HPP
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_raw_socket.hpp b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_raw_socket.hpp
deleted file mode 100644
index b0f3f18..0000000
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_raw_socket.hpp
+++ /dev/null
@@ -1,940 +0,0 @@
-//
-// basic_raw_socket.hpp
-// ~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef ASIO_BASIC_RAW_SOCKET_HPP
-#define ASIO_BASIC_RAW_SOCKET_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include <cstddef>
-#include "asio/basic_socket.hpp"
-#include "asio/detail/handler_type_requirements.hpp"
-#include "asio/detail/throw_error.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/error.hpp"
-#include "asio/raw_socket_service.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-/// Provides raw-oriented socket functionality.
-/**
- * The basic_raw_socket class template provides asynchronous and blocking
- * raw-oriented socket functionality.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-template <typename Protocol,
-    typename RawSocketService = raw_socket_service<Protocol> >
-class basic_raw_socket
-  : public basic_socket<Protocol, RawSocketService>
-{
-public:
-  /// (Deprecated: Use native_handle_type.) The native representation of a
-  /// socket.
-  typedef typename RawSocketService::native_handle_type native_type;
-
-  /// The native representation of a socket.
-  typedef typename RawSocketService::native_handle_type native_handle_type;
-
-  /// The protocol type.
-  typedef Protocol protocol_type;
-
-  /// The endpoint type.
-  typedef typename Protocol::endpoint endpoint_type;
-
-  /// Construct a basic_raw_socket without opening it.
-  /**
-   * This constructor creates a raw socket without opening it. The open()
-   * function must be called before data can be sent or received on the socket.
-   *
-   * @param io_service The io_service object that the raw socket will use
-   * to dispatch handlers for any asynchronous operations performed on the
-   * socket.
-   */
-  explicit basic_raw_socket(asio::io_service& io_service)
-    : basic_socket<Protocol, RawSocketService>(io_service)
-  {
-  }
-
-  /// Construct and open a basic_raw_socket.
-  /**
-   * This constructor creates and opens a raw socket.
-   *
-   * @param io_service The io_service object that the raw socket will use
-   * to dispatch handlers for any asynchronous operations performed on the
-   * socket.
-   *
-   * @param protocol An object specifying protocol parameters to be used.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  basic_raw_socket(asio::io_service& io_service,
-      const protocol_type& protocol)
-    : basic_socket<Protocol, RawSocketService>(io_service, protocol)
-  {
-  }
-
-  /// Construct a basic_raw_socket, opening it and binding it to the given
-  /// local endpoint.
-  /**
-   * This constructor creates a raw socket and automatically opens it bound
-   * to the specified endpoint on the local machine. The protocol used is the
-   * protocol associated with the given endpoint.
-   *
-   * @param io_service The io_service object that the raw socket will use
-   * to dispatch handlers for any asynchronous operations performed on the
-   * socket.
-   *
-   * @param endpoint An endpoint on the local machine to which the raw
-   * socket will be bound.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  basic_raw_socket(asio::io_service& io_service,
-      const endpoint_type& endpoint)
-    : basic_socket<Protocol, RawSocketService>(io_service, endpoint)
-  {
-  }
-
-  /// Construct a basic_raw_socket on an existing native socket.
-  /**
-   * This constructor creates a raw socket object to hold an existing
-   * native socket.
-   *
-   * @param io_service The io_service object that the raw socket will use
-   * to dispatch handlers for any asynchronous operations performed on the
-   * socket.
-   *
-   * @param protocol An object specifying protocol parameters to be used.
-   *
-   * @param native_socket The new underlying socket implementation.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  basic_raw_socket(asio::io_service& io_service,
-      const protocol_type& protocol, const native_handle_type& native_socket)
-    : basic_socket<Protocol, RawSocketService>(
-        io_service, protocol, native_socket)
-  {
-  }
-
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-  /// Move-construct a basic_raw_socket from another.
-  /**
-   * This constructor moves a raw socket from one object to another.
-   *
-   * @param other The other basic_raw_socket object from which the move
-   * will occur.
-   *
-   * @note Following the move, the moved-from object is in the same state as if
-   * constructed using the @c basic_raw_socket(io_service&) constructor.
-   */
-  basic_raw_socket(basic_raw_socket&& other)
-    : basic_socket<Protocol, RawSocketService>(
-        ASIO_MOVE_CAST(basic_raw_socket)(other))
-  {
-  }
-
-  /// Move-assign a basic_raw_socket from another.
-  /**
-   * This assignment operator moves a raw socket from one object to another.
-   *
-   * @param other The other basic_raw_socket object from which the move
-   * will occur.
-   *
-   * @note Following the move, the moved-from object is in the same state as if
-   * constructed using the @c basic_raw_socket(io_service&) constructor.
-   */
-  basic_raw_socket& operator=(basic_raw_socket&& other)
-  {
-    basic_socket<Protocol, RawSocketService>::operator=(
-        ASIO_MOVE_CAST(basic_raw_socket)(other));
-    return *this;
-  }
-
-  /// Move-construct a basic_raw_socket from a socket of another protocol type.
-  /**
-   * This constructor moves a raw socket from one object to another.
-   *
-   * @param other The other basic_raw_socket object from which the move will
-   * occur.
-   *
-   * @note Following the move, the moved-from object is in the same state as if
-   * constructed using the @c basic_raw_socket(io_service&) constructor.
-   */
-  template <typename Protocol1, typename RawSocketService1>
-  basic_raw_socket(basic_raw_socket<Protocol1, RawSocketService1>&& other,
-      typename enable_if<is_convertible<Protocol1, Protocol>::value>::type* = 0)
-    : basic_socket<Protocol, RawSocketService>(
-        ASIO_MOVE_CAST2(basic_raw_socket<
-          Protocol1, RawSocketService1>)(other))
-  {
-  }
-
-  /// Move-assign a basic_raw_socket from a socket of another protocol type.
-  /**
-   * This assignment operator moves a raw socket from one object to another.
-   *
-   * @param other The other basic_raw_socket object from which the move
-   * will occur.
-   *
-   * @note Following the move, the moved-from object is in the same state as if
-   * constructed using the @c basic_raw_socket(io_service&) constructor.
-   */
-  template <typename Protocol1, typename RawSocketService1>
-  typename enable_if<is_convertible<Protocol1, Protocol>::value,
-      basic_raw_socket>::type& operator=(
-        basic_raw_socket<Protocol1, RawSocketService1>&& other)
-  {
-    basic_socket<Protocol, RawSocketService>::operator=(
-        ASIO_MOVE_CAST2(basic_raw_socket<
-          Protocol1, RawSocketService1>)(other));
-    return *this;
-  }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
-  /// Send some data on a connected socket.
-  /**
-   * This function is used to send data on the raw socket. The function call
-   * will block until the data has been sent successfully or an error occurs.
-   *
-   * @param buffers One ore more data buffers to be sent on the socket.
-   *
-   * @returns The number of bytes sent.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @note The send operation can only be used with a connected socket. Use
-   * the send_to function to send data on an unconnected raw socket.
-   *
-   * @par Example
-   * To send a single data buffer use the @ref buffer function as follows:
-   * @code socket.send(asio::buffer(data, size)); @endcode
-   * See the @ref buffer documentation for information on sending multiple
-   * buffers in one go, and how to use it with arrays, boost::array or
-   * std::vector.
-   */
-  template <typename ConstBufferSequence>
-  std::size_t send(const ConstBufferSequence& buffers)
-  {
-    asio::error_code ec;
-    std::size_t s = this->get_service().send(
-        this->get_implementation(), buffers, 0, ec);
-    asio::detail::throw_error(ec, "send");
-    return s;
-  }
-
-  /// Send some data on a connected socket.
-  /**
-   * This function is used to send data on the raw socket. The function call
-   * will block until the data has been sent successfully or an error occurs.
-   *
-   * @param buffers One ore more data buffers to be sent on the socket.
-   *
-   * @param flags Flags specifying how the send call is to be made.
-   *
-   * @returns The number of bytes sent.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @note The send operation can only be used with a connected socket. Use
-   * the send_to function to send data on an unconnected raw socket.
-   */
-  template <typename ConstBufferSequence>
-  std::size_t send(const ConstBufferSequence& buffers,
-      socket_base::message_flags flags)
-  {
-    asio::error_code ec;
-    std::size_t s = this->get_service().send(
-        this->get_implementation(), buffers, flags, ec);
-    asio::detail::throw_error(ec, "send");
-    return s;
-  }
-
-  /// Send some data on a connected socket.
-  /**
-   * This function is used to send data on the raw socket. The function call
-   * will block until the data has been sent successfully or an error occurs.
-   *
-   * @param buffers One or more data buffers to be sent on the socket.
-   *
-   * @param flags Flags specifying how the send call is to be made.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @returns The number of bytes sent.
-   *
-   * @note The send operation can only be used with a connected socket. Use
-   * the send_to function to send data on an unconnected raw socket.
-   */
-  template <typename ConstBufferSequence>
-  std::size_t send(const ConstBufferSequence& buffers,
-      socket_base::message_flags flags, asio::error_code& ec)
-  {
-    return this->get_service().send(
-        this->get_implementation(), buffers, flags, ec);
-  }
-
-  /// Start an asynchronous send on a connected socket.
-  /**
-   * This function is used to send data on the raw socket. The function call
-   * will block until the data has been sent successfully or an error occurs.
-   *
-   * @param buffers One or more data buffers to be sent on the socket. Although
-   * the buffers object may be copied as necessary, ownership of the underlying
-   * memory blocks is retained by the caller, which must guarantee that they
-   * remain valid until the handler is called.
-   *
-   * @param handler The handler to be called when the send operation completes.
-   * Copies will be made of the handler as required. The function signature of
-   * the handler must be:
-   * @code void handler(
-   *   const asio::error_code& error, // Result of operation.
-   *   std::size_t bytes_transferred           // Number of bytes sent.
-   * ); @endcode
-   * Regardless of whether the asynchronous operation completes immediately or
-   * not, the handler will not be invoked from within this function. Invocation
-   * of the handler will be performed in a manner equivalent to using
-   * asio::io_service::post().
-   *
-   * @note The async_send operation can only be used with a connected socket.
-   * Use the async_send_to function to send data on an unconnected raw
-   * socket.
-   *
-   * @par Example
-   * To send a single data buffer use the @ref buffer function as follows:
-   * @code
-   * socket.async_send(asio::buffer(data, size), handler);
-   * @endcode
-   * See the @ref buffer documentation for information on sending multiple
-   * buffers in one go, and how to use it with arrays, boost::array or
-   * std::vector.
-   */
-  template <typename ConstBufferSequence, typename WriteHandler>
-  ASIO_INITFN_RESULT_TYPE(WriteHandler,
-      void (asio::error_code, std::size_t))
-  async_send(const ConstBufferSequence& buffers,
-      ASIO_MOVE_ARG(WriteHandler) handler)
-  {
-    // If you get an error on the following line it means that your handler does
-    // not meet the documented type requirements for a WriteHandler.
-    ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
-    return this->get_service().async_send(this->get_implementation(),
-        buffers, 0, ASIO_MOVE_CAST(WriteHandler)(handler));
-  }
-
-  /// Start an asynchronous send on a connected socket.
-  /**
-   * This function is used to send data on the raw socket. The function call
-   * will block until the data has been sent successfully or an error occurs.
-   *
-   * @param buffers One or more data buffers to be sent on the socket. Although
-   * the buffers object may be copied as necessary, ownership of the underlying
-   * memory blocks is retained by the caller, which must guarantee that they
-   * remain valid until the handler is called.
-   *
-   * @param flags Flags specifying how the send call is to be made.
-   *
-   * @param handler The handler to be called when the send operation completes.
-   * Copies will be made of the handler as required. The function signature of
-   * the handler must be:
-   * @code void handler(
-   *   const asio::error_code& error, // Result of operation.
-   *   std::size_t bytes_transferred           // Number of bytes sent.
-   * ); @endcode
-   * Regardless of whether the asynchronous operation completes immediately or
-   * not, the handler will not be invoked from within this function. Invocation
-   * of the handler will be performed in a manner equivalent to using
-   * asio::io_service::post().
-   *
-   * @note The async_send operation can only be used with a connected socket.
-   * Use the async_send_to function to send data on an unconnected raw
-   * socket.
-   */
-  template <typename ConstBufferSequence, typename WriteHandler>
-  ASIO_INITFN_RESULT_TYPE(WriteHandler,
-      void (asio::error_code, std::size_t))
-  async_send(const ConstBufferSequence& buffers,
-      socket_base::message_flags flags,
-      ASIO_MOVE_ARG(WriteHandler) handler)
-  {
-    // If you get an error on the following line it means that your handler does
-    // not meet the documented type requirements for a WriteHandler.
-    ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
-    return this->get_service().async_send(this->get_implementation(),
-        buffers, flags, ASIO_MOVE_CAST(WriteHandler)(handler));
-  }
-
-  /// Send raw data to the specified endpoint.
-  /**
-   * This function is used to send raw data to the specified remote endpoint.
-   * The function call will block until the data has been sent successfully or
-   * an error occurs.
-   *
-   * @param buffers One or more data buffers to be sent to the remote endpoint.
-   *
-   * @param destination The remote endpoint to which the data will be sent.
-   *
-   * @returns The number of bytes sent.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @par Example
-   * To send a single data buffer use the @ref buffer function as follows:
-   * @code
-   * asio::ip::udp::endpoint destination(
-   *     asio::ip::address::from_string("1.2.3.4"), 12345);
-   * socket.send_to(asio::buffer(data, size), destination);
-   * @endcode
-   * See the @ref buffer documentation for information on sending multiple
-   * buffers in one go, and how to use it with arrays, boost::array or
-   * std::vector.
-   */
-  template <typename ConstBufferSequence>
-  std::size_t send_to(const ConstBufferSequence& buffers,
-      const endpoint_type& destination)
-  {
-    asio::error_code ec;
-    std::size_t s = this->get_service().send_to(
-        this->get_implementation(), buffers, destination, 0, ec);
-    asio::detail::throw_error(ec, "send_to");
-    return s;
-  }
-
-  /// Send raw data to the specified endpoint.
-  /**
-   * This function is used to send raw data to the specified remote endpoint.
-   * The function call will block until the data has been sent successfully or
-   * an error occurs.
-   *
-   * @param buffers One or more data buffers to be sent to the remote endpoint.
-   *
-   * @param destination The remote endpoint to which the data will be sent.
-   *
-   * @param flags Flags specifying how the send call is to be made.
-   *
-   * @returns The number of bytes sent.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  template <typename ConstBufferSequence>
-  std::size_t send_to(const ConstBufferSequence& buffers,
-      const endpoint_type& destination, socket_base::message_flags flags)
-  {
-    asio::error_code ec;
-    std::size_t s = this->get_service().send_to(
-        this->get_implementation(), buffers, destination, flags, ec);
-    asio::detail::throw_error(ec, "send_to");
-    return s;
-  }
-
-  /// Send raw data to the specified endpoint.
-  /**
-   * This function is used to send raw data to the specified remote endpoint.
-   * The function call will block until the data has been sent successfully or
-   * an error occurs.
-   *
-   * @param buffers One or more data buffers to be sent to the remote endpoint.
-   *
-   * @param destination The remote endpoint to which the data will be sent.
-   *
-   * @param flags Flags specifying how the send call is to be made.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @returns The number of bytes sent.
-   */
-  template <typename ConstBufferSequence>
-  std::size_t send_to(const ConstBufferSequence& buffers,
-      const endpoint_type& destination, socket_base::message_flags flags,
-      asio::error_code& ec)
-  {
-    return this->get_service().send_to(this->get_implementation(),
-        buffers, destination, flags, ec);
-  }
-
-  /// Start an asynchronous send.
-  /**
-   * This function is used to asynchronously send raw data to the specified
-   * remote endpoint. The function call always returns immediately.
-   *
-   * @param buffers One or more data buffers to be sent to the remote endpoint.
-   * Although the buffers object may be copied as necessary, ownership of the
-   * underlying memory blocks is retained by the caller, which must guarantee
-   * that they remain valid until the handler is called.
-   *
-   * @param destination The remote endpoint to which the data will be sent.
-   * Copies will be made of the endpoint as required.
-   *
-   * @param handler The handler to be called when the send operation completes.
-   * Copies will be made of the handler as required. The function signature of
-   * the handler must be:
-   * @code void handler(
-   *   const asio::error_code& error, // Result of operation.
-   *   std::size_t bytes_transferred           // Number of bytes sent.
-   * ); @endcode
-   * Regardless of whether the asynchronous operation completes immediately or
-   * not, the handler will not be invoked from within this function. Invocation
-   * of the handler will be performed in a manner equivalent to using
-   * asio::io_service::post().
-   *
-   * @par Example
-   * To send a single data buffer use the @ref buffer function as follows:
-   * @code
-   * asio::ip::udp::endpoint destination(
-   *     asio::ip::address::from_string("1.2.3.4"), 12345);
-   * socket.async_send_to(
-   *     asio::buffer(data, size), destination, handler);
-   * @endcode
-   * See the @ref buffer documentation for information on sending multiple
-   * buffers in one go, and how to use it with arrays, boost::array or
-   * std::vector.
-   */
-  template <typename ConstBufferSequence, typename WriteHandler>
-  ASIO_INITFN_RESULT_TYPE(WriteHandler,
-      void (asio::error_code, std::size_t))
-  async_send_to(const ConstBufferSequence& buffers,
-      const endpoint_type& destination,
-      ASIO_MOVE_ARG(WriteHandler) handler)
-  {
-    // If you get an error on the following line it means that your handler does
-    // not meet the documented type requirements for a WriteHandler.
-    ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
-    return this->get_service().async_send_to(this->get_implementation(),
-        buffers, destination, 0, ASIO_MOVE_CAST(WriteHandler)(handler));
-  }
-
-  /// Start an asynchronous send.
-  /**
-   * This function is used to asynchronously send raw data to the specified
-   * remote endpoint. The function call always returns immediately.
-   *
-   * @param buffers One or more data buffers to be sent to the remote endpoint.
-   * Although the buffers object may be copied as necessary, ownership of the
-   * underlying memory blocks is retained by the caller, which must guarantee
-   * that they remain valid until the handler is called.
-   *
-   * @param flags Flags specifying how the send call is to be made.
-   *
-   * @param destination The remote endpoint to which the data will be sent.
-   * Copies will be made of the endpoint as required.
-   *
-   * @param handler The handler to be called when the send operation completes.
-   * Copies will be made of the handler as required. The function signature of
-   * the handler must be:
-   * @code void handler(
-   *   const asio::error_code& error, // Result of operation.
-   *   std::size_t bytes_transferred           // Number of bytes sent.
-   * ); @endcode
-   * Regardless of whether the asynchronous operation completes immediately or
-   * not, the handler will not be invoked from within this function. Invocation
-   * of the handler will be performed in a manner equivalent to using
-   * asio::io_service::post().
-   */
-  template <typename ConstBufferSequence, typename WriteHandler>
-  ASIO_INITFN_RESULT_TYPE(WriteHandler,
-      void (asio::error_code, std::size_t))
-  async_send_to(const ConstBufferSequence& buffers,
-      const endpoint_type& destination, socket_base::message_flags flags,
-      ASIO_MOVE_ARG(WriteHandler) handler)
-  {
-    // If you get an error on the following line it means that your handler does
-    // not meet the documented type requirements for a WriteHandler.
-    ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
-    return this->get_service().async_send_to(
-        this->get_implementation(), buffers, destination, flags,
-        ASIO_MOVE_CAST(WriteHandler)(handler));
-  }
-
-  /// Receive some data on a connected socket.
-  /**
-   * This function is used to receive data on the raw socket. The function
-   * call will block until data has been received successfully or an error
-   * occurs.
-   *
-   * @param buffers One or more buffers into which the data will be received.
-   *
-   * @returns The number of bytes received.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @note The receive operation can only be used with a connected socket. Use
-   * the receive_from function to receive data on an unconnected raw
-   * socket.
-   *
-   * @par Example
-   * To receive into a single data buffer use the @ref buffer function as
-   * follows:
-   * @code socket.receive(asio::buffer(data, size)); @endcode
-   * See the @ref buffer documentation for information on receiving into
-   * multiple buffers in one go, and how to use it with arrays, boost::array or
-   * std::vector.
-   */
-  template <typename MutableBufferSequence>
-  std::size_t receive(const MutableBufferSequence& buffers)
-  {
-    asio::error_code ec;
-    std::size_t s = this->get_service().receive(
-        this->get_implementation(), buffers, 0, ec);
-    asio::detail::throw_error(ec, "receive");
-    return s;
-  }
-
-  /// Receive some data on a connected socket.
-  /**
-   * This function is used to receive data on the raw socket. The function
-   * call will block until data has been received successfully or an error
-   * occurs.
-   *
-   * @param buffers One or more buffers into which the data will be received.
-   *
-   * @param flags Flags specifying how the receive call is to be made.
-   *
-   * @returns The number of bytes received.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @note The receive operation can only be used with a connected socket. Use
-   * the receive_from function to receive data on an unconnected raw
-   * socket.
-   */
-  template <typename MutableBufferSequence>
-  std::size_t receive(const MutableBufferSequence& buffers,
-      socket_base::message_flags flags)
-  {
-    asio::error_code ec;
-    std::size_t s = this->get_service().receive(
-        this->get_implementation(), buffers, flags, ec);
-    asio::detail::throw_error(ec, "receive");
-    return s;
-  }
-
-  /// Receive some data on a connected socket.
-  /**
-   * This function is used to receive data on the raw socket. The function
-   * call will block until data has been received successfully or an error
-   * occurs.
-   *
-   * @param buffers One or more buffers into which the data will be received.
-   *
-   * @param flags Flags specifying how the receive call is to be made.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @returns The number of bytes received.
-   *
-   * @note The receive operation can only be used with a connected socket. Use
-   * the receive_from function to receive data on an unconnected raw
-   * socket.
-   */
-  template <typename MutableBufferSequence>
-  std::size_t receive(const MutableBufferSequence& buffers,
-      socket_base::message_flags flags, asio::error_code& ec)
-  {
-    return this->get_service().receive(
-        this->get_implementation(), buffers, flags, ec);
-  }
-
-  /// Start an asynchronous receive on a connected socket.
-  /**
-   * This function is used to asynchronously receive data from the raw
-   * socket. The function call always returns immediately.
-   *
-   * @param buffers One or more buffers into which the data will be received.
-   * Although the buffers object may be copied as necessary, ownership of the
-   * underlying memory blocks is retained by the caller, which must guarantee
-   * that they remain valid until the handler is called.
-   *
-   * @param handler The handler to be called when the receive operation
-   * completes. Copies will be made of the handler as required. The function
-   * signature of the handler must be:
-   * @code void handler(
-   *   const asio::error_code& error, // Result of operation.
-   *   std::size_t bytes_transferred           // Number of bytes received.
-   * ); @endcode
-   * Regardless of whether the asynchronous operation completes immediately or
-   * not, the handler will not be invoked from within this function. Invocation
-   * of the handler will be performed in a manner equivalent to using
-   * asio::io_service::post().
-   *
-   * @note The async_receive operation can only be used with a connected socket.
-   * Use the async_receive_from function to receive data on an unconnected
-   * raw socket.
-   *
-   * @par Example
-   * To receive into a single data buffer use the @ref buffer function as
-   * follows:
-   * @code
-   * socket.async_receive(asio::buffer(data, size), handler);
-   * @endcode
-   * See the @ref buffer documentation for information on receiving into
-   * multiple buffers in one go, and how to use it with arrays, boost::array or
-   * std::vector.
-   */
-  template <typename MutableBufferSequence, typename ReadHandler>
-  ASIO_INITFN_RESULT_TYPE(ReadHandler,
-      void (asio::error_code, std::size_t))
-  async_receive(const MutableBufferSequence& buffers,
-      ASIO_MOVE_ARG(ReadHandler) handler)
-  {
-    // If you get an error on the following line it means that your handler does
-    // not meet the documented type requirements for a ReadHandler.
-    ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
-    return this->get_service().async_receive(this->get_implementation(),
-        buffers, 0, ASIO_MOVE_CAST(ReadHandler)(handler));
-  }
-
-  /// Start an asynchronous receive on a connected socket.
-  /**
-   * This function is used to asynchronously receive data from the raw
-   * socket. The function call always returns immediately.
-   *
-   * @param buffers One or more buffers into which the data will be received.
-   * Although the buffers object may be copied as necessary, ownership of the
-   * underlying memory blocks is retained by the caller, which must guarantee
-   * that they remain valid until the handler is called.
-   *
-   * @param flags Flags specifying how the receive call is to be made.
-   *
-   * @param handler The handler to be called when the receive operation
-   * completes. Copies will be made of the handler as required. The function
-   * signature of the handler must be:
-   * @code void handler(
-   *   const asio::error_code& error, // Result of operation.
-   *   std::size_t bytes_transferred           // Number of bytes received.
-   * ); @endcode
-   * Regardless of whether the asynchronous operation completes immediately or
-   * not, the handler will not be invoked from within this function. Invocation
-   * of the handler will be performed in a manner equivalent to using
-   * asio::io_service::post().
-   *
-   * @note The async_receive operation can only be used with a connected socket.
-   * Use the async_receive_from function to receive data on an unconnected
-   * raw socket.
-   */
-  template <typename MutableBufferSequence, typename ReadHandler>
-  ASIO_INITFN_RESULT_TYPE(ReadHandler,
-      void (asio::error_code, std::size_t))
-  async_receive(const MutableBufferSequence& buffers,
-      socket_base::message_flags flags,
-      ASIO_MOVE_ARG(ReadHandler) handler)
-  {
-    // If you get an error on the following line it means that your handler does
-    // not meet the documented type requirements for a ReadHandler.
-    ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
-    return this->get_service().async_receive(this->get_implementation(),
-        buffers, flags, ASIO_MOVE_CAST(ReadHandler)(handler));
-  }
-
-  /// Receive raw data with the endpoint of the sender.
-  /**
-   * This function is used to receive raw data. The function call will block
-   * until data has been received successfully or an error occurs.
-   *
-   * @param buffers One or more buffers into which the data will be received.
-   *
-   * @param sender_endpoint An endpoint object that receives the endpoint of
-   * the remote sender of the data.
-   *
-   * @returns The number of bytes received.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @par Example
-   * To receive into a single data buffer use the @ref buffer function as
-   * follows:
-   * @code
-   * asio::ip::udp::endpoint sender_endpoint;
-   * socket.receive_from(
-   *     asio::buffer(data, size), sender_endpoint);
-   * @endcode
-   * See the @ref buffer documentation for information on receiving into
-   * multiple buffers in one go, and how to use it with arrays, boost::array or
-   * std::vector.
-   */
-  template <typename MutableBufferSequence>
-  std::size_t receive_from(const MutableBufferSequence& buffers,
-      endpoint_type& sender_endpoint)
-  {
-    asio::error_code ec;
-    std::size_t s = this->get_service().receive_from(
-        this->get_implementation(), buffers, sender_endpoint, 0, ec);
-    asio::detail::throw_error(ec, "receive_from");
-    return s;
-  }
-  
-  /// Receive raw data with the endpoint of the sender.
-  /**
-   * This function is used to receive raw data. The function call will block
-   * until data has been received successfully or an error occurs.
-   *
-   * @param buffers One or more buffers into which the data will be received.
-   *
-   * @param sender_endpoint An endpoint object that receives the endpoint of
-   * the remote sender of the data.
-   *
-   * @param flags Flags specifying how the receive call is to be made.
-   *
-   * @returns The number of bytes received.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  template <typename MutableBufferSequence>
-  std::size_t receive_from(const MutableBufferSequence& buffers,
-      endpoint_type& sender_endpoint, socket_base::message_flags flags)
-  {
-    asio::error_code ec;
-    std::size_t s = this->get_service().receive_from(
-        this->get_implementation(), buffers, sender_endpoint, flags, ec);
-    asio::detail::throw_error(ec, "receive_from");
-    return s;
-  }
-  
-  /// Receive raw data with the endpoint of the sender.
-  /**
-   * This function is used to receive raw data. The function call will block
-   * until data has been received successfully or an error occurs.
-   *
-   * @param buffers One or more buffers into which the data will be received.
-   *
-   * @param sender_endpoint An endpoint object that receives the endpoint of
-   * the remote sender of the data.
-   *
-   * @param flags Flags specifying how the receive call is to be made.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @returns The number of bytes received.
-   */
-  template <typename MutableBufferSequence>
-  std::size_t receive_from(const MutableBufferSequence& buffers,
-      endpoint_type& sender_endpoint, socket_base::message_flags flags,
-      asio::error_code& ec)
-  {
-    return this->get_service().receive_from(this->get_implementation(),
-        buffers, sender_endpoint, flags, ec);
-  }
-
-  /// Start an asynchronous receive.
-  /**
-   * This function is used to asynchronously receive raw data. The function
-   * call always returns immediately.
-   *
-   * @param buffers One or more buffers into which the data will be received.
-   * Although the buffers object may be copied as necessary, ownership of the
-   * underlying memory blocks is retained by the caller, which must guarantee
-   * that they remain valid until the handler is called.
-   *
-   * @param sender_endpoint An endpoint object that receives the endpoint of
-   * the remote sender of the data. Ownership of the sender_endpoint object
-   * is retained by the caller, which must guarantee that it is valid until the
-   * handler is called.
-   *
-   * @param handler The handler to be called when the receive operation
-   * completes. Copies will be made of the handler as required. The function
-   * signature of the handler must be:
-   * @code void handler(
-   *   const asio::error_code& error, // Result of operation.
-   *   std::size_t bytes_transferred           // Number of bytes received.
-   * ); @endcode
-   * Regardless of whether the asynchronous operation completes immediately or
-   * not, the handler will not be invoked from within this function. Invocation
-   * of the handler will be performed in a manner equivalent to using
-   * asio::io_service::post().
-   *
-   * @par Example
-   * To receive into a single data buffer use the @ref buffer function as
-   * follows:
-   * @code socket.async_receive_from(
-   *     asio::buffer(data, size), 0, sender_endpoint, handler); @endcode
-   * See the @ref buffer documentation for information on receiving into
-   * multiple buffers in one go, and how to use it with arrays, boost::array or
-   * std::vector.
-   */
-  template <typename MutableBufferSequence, typename ReadHandler>
-  ASIO_INITFN_RESULT_TYPE(ReadHandler,
-      void (asio::error_code, std::size_t))
-  async_receive_from(const MutableBufferSequence& buffers,
-      endpoint_type& sender_endpoint,
-      ASIO_MOVE_ARG(ReadHandler) handler)
-  {
-    // If you get an error on the following line it means that your handler does
-    // not meet the documented type requirements for a ReadHandler.
-    ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
-    return this->get_service().async_receive_from(
-        this->get_implementation(), buffers, sender_endpoint, 0,
-        ASIO_MOVE_CAST(ReadHandler)(handler));
-  }
-
-  /// Start an asynchronous receive.
-  /**
-   * This function is used to asynchronously receive raw data. The function
-   * call always returns immediately.
-   *
-   * @param buffers One or more buffers into which the data will be received.
-   * Although the buffers object may be copied as necessary, ownership of the
-   * underlying memory blocks is retained by the caller, which must guarantee
-   * that they remain valid until the handler is called.
-   *
-   * @param sender_endpoint An endpoint object that receives the endpoint of
-   * the remote sender of the data. Ownership of the sender_endpoint object
-   * is retained by the caller, which must guarantee that it is valid until the
-   * handler is called.
-   *
-   * @param flags Flags specifying how the receive call is to be made.
-   *
-   * @param handler The handler to be called when the receive operation
-   * completes. Copies will be made of the handler as required. The function
-   * signature of the handler must be:
-   * @code void handler(
-   *   const asio::error_code& error, // Result of operation.
-   *   std::size_t bytes_transferred           // Number of bytes received.
-   * ); @endcode
-   * Regardless of whether the asynchronous operation completes immediately or
-   * not, the handler will not be invoked from within this function. Invocation
-   * of the handler will be performed in a manner equivalent to using
-   * asio::io_service::post().
-   */
-  template <typename MutableBufferSequence, typename ReadHandler>
-  ASIO_INITFN_RESULT_TYPE(ReadHandler,
-      void (asio::error_code, std::size_t))
-  async_receive_from(const MutableBufferSequence& buffers,
-      endpoint_type& sender_endpoint, socket_base::message_flags flags,
-      ASIO_MOVE_ARG(ReadHandler) handler)
-  {
-    // If you get an error on the following line it means that your handler does
-    // not meet the documented type requirements for a ReadHandler.
-    ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
-    return this->get_service().async_receive_from(
-        this->get_implementation(), buffers, sender_endpoint, flags,
-        ASIO_MOVE_CAST(ReadHandler)(handler));
-  }
-};
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_BASIC_RAW_SOCKET_HPP
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_seq_packet_socket.hpp b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_seq_packet_socket.hpp
deleted file mode 100644
index a3d720e..0000000
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_seq_packet_socket.hpp
+++ /dev/null
@@ -1,565 +0,0 @@
-//
-// basic_seq_packet_socket.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef ASIO_BASIC_SEQ_PACKET_SOCKET_HPP
-#define ASIO_BASIC_SEQ_PACKET_SOCKET_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include <cstddef>
-#include "asio/basic_socket.hpp"
-#include "asio/detail/handler_type_requirements.hpp"
-#include "asio/detail/throw_error.hpp"
-#include "asio/error.hpp"
-#include "asio/seq_packet_socket_service.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-/// Provides sequenced packet socket functionality.
-/**
- * The basic_seq_packet_socket class template provides asynchronous and blocking
- * sequenced packet socket functionality.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-template <typename Protocol,
-    typename SeqPacketSocketService = seq_packet_socket_service<Protocol> >
-class basic_seq_packet_socket
-  : public basic_socket<Protocol, SeqPacketSocketService>
-{
-public:
-  /// (Deprecated: Use native_handle_type.) The native representation of a
-  /// socket.
-  typedef typename SeqPacketSocketService::native_handle_type native_type;
-
-  /// The native representation of a socket.
-  typedef typename SeqPacketSocketService::native_handle_type
-    native_handle_type;
-
-  /// The protocol type.
-  typedef Protocol protocol_type;
-
-  /// The endpoint type.
-  typedef typename Protocol::endpoint endpoint_type;
-
-  /// Construct a basic_seq_packet_socket without opening it.
-  /**
-   * This constructor creates a sequenced packet socket without opening it. The
-   * socket needs to be opened and then connected or accepted before data can
-   * be sent or received on it.
-   *
-   * @param io_service The io_service object that the sequenced packet socket
-   * will use to dispatch handlers for any asynchronous operations performed on
-   * the socket.
-   */
-  explicit basic_seq_packet_socket(asio::io_service& io_service)
-    : basic_socket<Protocol, SeqPacketSocketService>(io_service)
-  {
-  }
-
-  /// Construct and open a basic_seq_packet_socket.
-  /**
-   * This constructor creates and opens a sequenced_packet socket. The socket
-   * needs to be connected or accepted before data can be sent or received on
-   * it.
-   *
-   * @param io_service The io_service object that the sequenced packet socket
-   * will use to dispatch handlers for any asynchronous operations performed on
-   * the socket.
-   *
-   * @param protocol An object specifying protocol parameters to be used.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  basic_seq_packet_socket(asio::io_service& io_service,
-      const protocol_type& protocol)
-    : basic_socket<Protocol, SeqPacketSocketService>(io_service, protocol)
-  {
-  }
-
-  /// Construct a basic_seq_packet_socket, opening it and binding it to the
-  /// given local endpoint.
-  /**
-   * This constructor creates a sequenced packet socket and automatically opens
-   * it bound to the specified endpoint on the local machine. The protocol used
-   * is the protocol associated with the given endpoint.
-   *
-   * @param io_service The io_service object that the sequenced packet socket
-   * will use to dispatch handlers for any asynchronous operations performed on
-   * the socket.
-   *
-   * @param endpoint An endpoint on the local machine to which the sequenced
-   * packet socket will be bound.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  basic_seq_packet_socket(asio::io_service& io_service,
-      const endpoint_type& endpoint)
-    : basic_socket<Protocol, SeqPacketSocketService>(io_service, endpoint)
-  {
-  }
-
-  /// Construct a basic_seq_packet_socket on an existing native socket.
-  /**
-   * This constructor creates a sequenced packet socket object to hold an
-   * existing native socket.
-   *
-   * @param io_service The io_service object that the sequenced packet socket
-   * will use to dispatch handlers for any asynchronous operations performed on
-   * the socket.
-   *
-   * @param protocol An object specifying protocol parameters to be used.
-   *
-   * @param native_socket The new underlying socket implementation.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  basic_seq_packet_socket(asio::io_service& io_service,
-      const protocol_type& protocol, const native_handle_type& native_socket)
-    : basic_socket<Protocol, SeqPacketSocketService>(
-        io_service, protocol, native_socket)
-  {
-  }
-
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-  /// Move-construct a basic_seq_packet_socket from another.
-  /**
-   * This constructor moves a sequenced packet socket from one object to
-   * another.
-   *
-   * @param other The other basic_seq_packet_socket object from which the move
-   * will occur.
-   *
-   * @note Following the move, the moved-from object is in the same state as if
-   * constructed using the @c basic_seq_packet_socket(io_service&) constructor.
-   */
-  basic_seq_packet_socket(basic_seq_packet_socket&& other)
-    : basic_socket<Protocol, SeqPacketSocketService>(
-        ASIO_MOVE_CAST(basic_seq_packet_socket)(other))
-  {
-  }
-
-  /// Move-assign a basic_seq_packet_socket from another.
-  /**
-   * This assignment operator moves a sequenced packet socket from one object to
-   * another.
-   *
-   * @param other The other basic_seq_packet_socket object from which the move
-   * will occur.
-   *
-   * @note Following the move, the moved-from object is in the same state as if
-   * constructed using the @c basic_seq_packet_socket(io_service&) constructor.
-   */
-  basic_seq_packet_socket& operator=(basic_seq_packet_socket&& other)
-  {
-    basic_socket<Protocol, SeqPacketSocketService>::operator=(
-        ASIO_MOVE_CAST(basic_seq_packet_socket)(other));
-    return *this;
-  }
-
-  /// Move-construct a basic_seq_packet_socket from a socket of another protocol
-  /// type.
-  /**
-   * This constructor moves a sequenced packet socket from one object to
-   * another.
-   *
-   * @param other The other basic_seq_packet_socket object from which the move
-   * will occur.
-   *
-   * @note Following the move, the moved-from object is in the same state as if
-   * constructed using the @c basic_seq_packet_socket(io_service&) constructor.
-   */
-  template <typename Protocol1, typename SeqPacketSocketService1>
-  basic_seq_packet_socket(
-      basic_seq_packet_socket<Protocol1, SeqPacketSocketService1>&& other,
-      typename enable_if<is_convertible<Protocol1, Protocol>::value>::type* = 0)
-    : basic_socket<Protocol, SeqPacketSocketService>(
-        ASIO_MOVE_CAST2(basic_seq_packet_socket<
-          Protocol1, SeqPacketSocketService1>)(other))
-  {
-  }
-
-  /// Move-assign a basic_seq_packet_socket from a socket of another protocol
-  /// type.
-  /**
-   * This assignment operator moves a sequenced packet socket from one object to
-   * another.
-   *
-   * @param other The other basic_seq_packet_socket object from which the move
-   * will occur.
-   *
-   * @note Following the move, the moved-from object is in the same state as if
-   * constructed using the @c basic_seq_packet_socket(io_service&) constructor.
-   */
-  template <typename Protocol1, typename SeqPacketSocketService1>
-  typename enable_if<is_convertible<Protocol1, Protocol>::value,
-      basic_seq_packet_socket>::type& operator=(
-        basic_seq_packet_socket<Protocol1, SeqPacketSocketService1>&& other)
-  {
-    basic_socket<Protocol, SeqPacketSocketService>::operator=(
-        ASIO_MOVE_CAST2(basic_seq_packet_socket<
-          Protocol1, SeqPacketSocketService1>)(other));
-    return *this;
-  }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
-  /// Send some data on the socket.
-  /**
-   * This function is used to send data on the sequenced packet socket. The
-   * function call will block until the data has been sent successfully, or an
-   * until error occurs.
-   *
-   * @param buffers One or more data buffers to be sent on the socket.
-   *
-   * @param flags Flags specifying how the send call is to be made.
-   *
-   * @returns The number of bytes sent.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @par Example
-   * To send a single data buffer use the @ref buffer function as follows:
-   * @code
-   * socket.send(asio::buffer(data, size), 0);
-   * @endcode
-   * See the @ref buffer documentation for information on sending multiple
-   * buffers in one go, and how to use it with arrays, boost::array or
-   * std::vector.
-   */
-  template <typename ConstBufferSequence>
-  std::size_t send(const ConstBufferSequence& buffers,
-      socket_base::message_flags flags)
-  {
-    asio::error_code ec;
-    std::size_t s = this->get_service().send(
-        this->get_implementation(), buffers, flags, ec);
-    asio::detail::throw_error(ec, "send");
-    return s;
-  }
-
-  /// Send some data on the socket.
-  /**
-   * This function is used to send data on the sequenced packet socket. The
-   * function call will block the data has been sent successfully, or an until
-   * error occurs.
-   *
-   * @param buffers One or more data buffers to be sent on the socket.
-   *
-   * @param flags Flags specifying how the send call is to be made.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @returns The number of bytes sent. Returns 0 if an error occurred.
-   *
-   * @note The send operation may not transmit all of the data to the peer.
-   * Consider using the @ref write function if you need to ensure that all data
-   * is written before the blocking operation completes.
-   */
-  template <typename ConstBufferSequence>
-  std::size_t send(const ConstBufferSequence& buffers,
-      socket_base::message_flags flags, asio::error_code& ec)
-  {
-    return this->get_service().send(
-        this->get_implementation(), buffers, flags, ec);
-  }
-
-  /// Start an asynchronous send.
-  /**
-   * This function is used to asynchronously send data on the sequenced packet
-   * socket. The function call always returns immediately.
-   *
-   * @param buffers One or more data buffers to be sent on the socket. Although
-   * the buffers object may be copied as necessary, ownership of the underlying
-   * memory blocks is retained by the caller, which must guarantee that they
-   * remain valid until the handler is called.
-   *
-   * @param flags Flags specifying how the send call is to be made.
-   *
-   * @param handler The handler to be called when the send operation completes.
-   * Copies will be made of the handler as required. The function signature of
-   * the handler must be:
-   * @code void handler(
-   *   const asio::error_code& error, // Result of operation.
-   *   std::size_t bytes_transferred           // Number of bytes sent.
-   * ); @endcode
-   * Regardless of whether the asynchronous operation completes immediately or
-   * not, the handler will not be invoked from within this function. Invocation
-   * of the handler will be performed in a manner equivalent to using
-   * asio::io_service::post().
-   *
-   * @par Example
-   * To send a single data buffer use the @ref buffer function as follows:
-   * @code
-   * socket.async_send(asio::buffer(data, size), 0, handler);
-   * @endcode
-   * See the @ref buffer documentation for information on sending multiple
-   * buffers in one go, and how to use it with arrays, boost::array or
-   * std::vector.
-   */
-  template <typename ConstBufferSequence, typename WriteHandler>
-  ASIO_INITFN_RESULT_TYPE(WriteHandler,
-      void (asio::error_code, std::size_t))
-  async_send(const ConstBufferSequence& buffers,
-      socket_base::message_flags flags,
-      ASIO_MOVE_ARG(WriteHandler) handler)
-  {
-    // If you get an error on the following line it means that your handler does
-    // not meet the documented type requirements for a WriteHandler.
-    ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
-    return this->get_service().async_send(this->get_implementation(),
-        buffers, flags, ASIO_MOVE_CAST(WriteHandler)(handler));
-  }
-
-  /// Receive some data on the socket.
-  /**
-   * This function is used to receive data on the sequenced packet socket. The
-   * function call will block until data has been received successfully, or
-   * until an error occurs.
-   *
-   * @param buffers One or more buffers into which the data will be received.
-   *
-   * @param out_flags After the receive call completes, contains flags
-   * associated with the received data. For example, if the
-   * socket_base::message_end_of_record bit is set then the received data marks
-   * the end of a record.
-   *
-   * @returns The number of bytes received.
-   *
-   * @throws asio::system_error Thrown on failure. An error code of
-   * asio::error::eof indicates that the connection was closed by the
-   * peer.
-   *
-   * @par Example
-   * To receive into a single data buffer use the @ref buffer function as
-   * follows:
-   * @code
-   * socket.receive(asio::buffer(data, size), out_flags);
-   * @endcode
-   * See the @ref buffer documentation for information on receiving into
-   * multiple buffers in one go, and how to use it with arrays, boost::array or
-   * std::vector.
-   */
-  template <typename MutableBufferSequence>
-  std::size_t receive(const MutableBufferSequence& buffers,
-      socket_base::message_flags& out_flags)
-  {
-    asio::error_code ec;
-    std::size_t s = this->get_service().receive(
-        this->get_implementation(), buffers, 0, out_flags, ec);
-    asio::detail::throw_error(ec, "receive");
-    return s;
-  }
-
-  /// Receive some data on the socket.
-  /**
-   * This function is used to receive data on the sequenced packet socket. The
-   * function call will block until data has been received successfully, or
-   * until an error occurs.
-   *
-   * @param buffers One or more buffers into which the data will be received.
-   *
-   * @param in_flags Flags specifying how the receive call is to be made.
-   *
-   * @param out_flags After the receive call completes, contains flags
-   * associated with the received data. For example, if the
-   * socket_base::message_end_of_record bit is set then the received data marks
-   * the end of a record.
-   *
-   * @returns The number of bytes received.
-   *
-   * @throws asio::system_error Thrown on failure. An error code of
-   * asio::error::eof indicates that the connection was closed by the
-   * peer.
-   *
-   * @note The receive operation may not receive all of the requested number of
-   * bytes. Consider using the @ref read function if you need to ensure that the
-   * requested amount of data is read before the blocking operation completes.
-   *
-   * @par Example
-   * To receive into a single data buffer use the @ref buffer function as
-   * follows:
-   * @code
-   * socket.receive(asio::buffer(data, size), 0, out_flags);
-   * @endcode
-   * See the @ref buffer documentation for information on receiving into
-   * multiple buffers in one go, and how to use it with arrays, boost::array or
-   * std::vector.
-   */
-  template <typename MutableBufferSequence>
-  std::size_t receive(const MutableBufferSequence& buffers,
-      socket_base::message_flags in_flags,
-      socket_base::message_flags& out_flags)
-  {
-    asio::error_code ec;
-    std::size_t s = this->get_service().receive(
-        this->get_implementation(), buffers, in_flags, out_flags, ec);
-    asio::detail::throw_error(ec, "receive");
-    return s;
-  }
-
-  /// Receive some data on a connected socket.
-  /**
-   * This function is used to receive data on the sequenced packet socket. The
-   * function call will block until data has been received successfully, or
-   * until an error occurs.
-   *
-   * @param buffers One or more buffers into which the data will be received.
-   *
-   * @param in_flags Flags specifying how the receive call is to be made.
-   *
-   * @param out_flags After the receive call completes, contains flags
-   * associated with the received data. For example, if the
-   * socket_base::message_end_of_record bit is set then the received data marks
-   * the end of a record.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @returns The number of bytes received. Returns 0 if an error occurred.
-   *
-   * @note The receive operation may not receive all of the requested number of
-   * bytes. Consider using the @ref read function if you need to ensure that the
-   * requested amount of data is read before the blocking operation completes.
-   */
-  template <typename MutableBufferSequence>
-  std::size_t receive(const MutableBufferSequence& buffers,
-      socket_base::message_flags in_flags,
-      socket_base::message_flags& out_flags, asio::error_code& ec)
-  {
-    return this->get_service().receive(this->get_implementation(),
-        buffers, in_flags, out_flags, ec);
-  }
-
-  /// Start an asynchronous receive.
-  /**
-   * This function is used to asynchronously receive data from the sequenced
-   * packet socket. The function call always returns immediately.
-   *
-   * @param buffers One or more buffers into which the data will be received.
-   * Although the buffers object may be copied as necessary, ownership of the
-   * underlying memory blocks is retained by the caller, which must guarantee
-   * that they remain valid until the handler is called.
-   *
-   * @param out_flags Once the asynchronous operation completes, contains flags
-   * associated with the received data. For example, if the
-   * socket_base::message_end_of_record bit is set then the received data marks
-   * the end of a record. The caller must guarantee that the referenced
-   * variable remains valid until the handler is called.
-   *
-   * @param handler The handler to be called when the receive operation
-   * completes. Copies will be made of the handler as required. The function
-   * signature of the handler must be:
-   * @code void handler(
-   *   const asio::error_code& error, // Result of operation.
-   *   std::size_t bytes_transferred           // Number of bytes received.
-   * ); @endcode
-   * Regardless of whether the asynchronous operation completes immediately or
-   * not, the handler will not be invoked from within this function. Invocation
-   * of the handler will be performed in a manner equivalent to using
-   * asio::io_service::post().
-   *
-   * @par Example
-   * To receive into a single data buffer use the @ref buffer function as
-   * follows:
-   * @code
-   * socket.async_receive(asio::buffer(data, size), out_flags, handler);
-   * @endcode
-   * See the @ref buffer documentation for information on receiving into
-   * multiple buffers in one go, and how to use it with arrays, boost::array or
-   * std::vector.
-   */
-  template <typename MutableBufferSequence, typename ReadHandler>
-  ASIO_INITFN_RESULT_TYPE(ReadHandler,
-      void (asio::error_code, std::size_t))
-  async_receive(const MutableBufferSequence& buffers,
-      socket_base::message_flags& out_flags,
-      ASIO_MOVE_ARG(ReadHandler) handler)
-  {
-    // If you get an error on the following line it means that your handler does
-    // not meet the documented type requirements for a ReadHandler.
-    ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
-    return this->get_service().async_receive(
-        this->get_implementation(), buffers, 0, out_flags,
-        ASIO_MOVE_CAST(ReadHandler)(handler));
-  }
-
-  /// Start an asynchronous receive.
-  /**
-   * This function is used to asynchronously receive data from the sequenced
-   * data socket. The function call always returns immediately.
-   *
-   * @param buffers One or more buffers into which the data will be received.
-   * Although the buffers object may be copied as necessary, ownership of the
-   * underlying memory blocks is retained by the caller, which must guarantee
-   * that they remain valid until the handler is called.
-   *
-   * @param in_flags Flags specifying how the receive call is to be made.
-   *
-   * @param out_flags Once the asynchronous operation completes, contains flags
-   * associated with the received data. For example, if the
-   * socket_base::message_end_of_record bit is set then the received data marks
-   * the end of a record. The caller must guarantee that the referenced
-   * variable remains valid until the handler is called.
-   *
-   * @param handler The handler to be called when the receive operation
-   * completes. Copies will be made of the handler as required. The function
-   * signature of the handler must be:
-   * @code void handler(
-   *   const asio::error_code& error, // Result of operation.
-   *   std::size_t bytes_transferred           // Number of bytes received.
-   * ); @endcode
-   * Regardless of whether the asynchronous operation completes immediately or
-   * not, the handler will not be invoked from within this function. Invocation
-   * of the handler will be performed in a manner equivalent to using
-   * asio::io_service::post().
-   *
-   * @par Example
-   * To receive into a single data buffer use the @ref buffer function as
-   * follows:
-   * @code
-   * socket.async_receive(
-   *     asio::buffer(data, size),
-   *     0, out_flags, handler);
-   * @endcode
-   * See the @ref buffer documentation for information on receiving into
-   * multiple buffers in one go, and how to use it with arrays, boost::array or
-   * std::vector.
-   */
-  template <typename MutableBufferSequence, typename ReadHandler>
-  ASIO_INITFN_RESULT_TYPE(ReadHandler,
-      void (asio::error_code, std::size_t))
-  async_receive(const MutableBufferSequence& buffers,
-      socket_base::message_flags in_flags,
-      socket_base::message_flags& out_flags,
-      ASIO_MOVE_ARG(ReadHandler) handler)
-  {
-    // If you get an error on the following line it means that your handler does
-    // not meet the documented type requirements for a ReadHandler.
-    ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
-    return this->get_service().async_receive(
-        this->get_implementation(), buffers, in_flags, out_flags,
-        ASIO_MOVE_CAST(ReadHandler)(handler));
-  }
-};
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_BASIC_SEQ_PACKET_SOCKET_HPP
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_serial_port.hpp b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_serial_port.hpp
deleted file mode 100644
index 007d293..0000000
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_serial_port.hpp
+++ /dev/null
@@ -1,695 +0,0 @@
-//
-// basic_serial_port.hpp
-// ~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef ASIO_BASIC_SERIAL_PORT_HPP
-#define ASIO_BASIC_SERIAL_PORT_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_SERIAL_PORT) \
-  || defined(GENERATING_DOCUMENTATION)
-
-#include <string>
-#include "asio/basic_io_object.hpp"
-#include "asio/detail/handler_type_requirements.hpp"
-#include "asio/detail/throw_error.hpp"
-#include "asio/error.hpp"
-#include "asio/serial_port_base.hpp"
-#include "asio/serial_port_service.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-/// Provides serial port functionality.
-/**
- * The basic_serial_port class template provides functionality that is common
- * to all serial ports.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-template <typename SerialPortService = serial_port_service>
-class basic_serial_port
-  : public basic_io_object<SerialPortService>,
-    public serial_port_base
-{
-public:
-  /// (Deprecated: Use native_handle_type.) The native representation of a
-  /// serial port.
-  typedef typename SerialPortService::native_handle_type native_type;
-
-  /// The native representation of a serial port.
-  typedef typename SerialPortService::native_handle_type native_handle_type;
-
-  /// A basic_serial_port is always the lowest layer.
-  typedef basic_serial_port<SerialPortService> lowest_layer_type;
-
-  /// Construct a basic_serial_port without opening it.
-  /**
-   * This constructor creates a serial port without opening it.
-   *
-   * @param io_service The io_service object that the serial port will use to
-   * dispatch handlers for any asynchronous operations performed on the port.
-   */
-  explicit basic_serial_port(asio::io_service& io_service)
-    : basic_io_object<SerialPortService>(io_service)
-  {
-  }
-
-  /// Construct and open a basic_serial_port.
-  /**
-   * This constructor creates and opens a serial port for the specified device
-   * name.
-   *
-   * @param io_service The io_service object that the serial port will use to
-   * dispatch handlers for any asynchronous operations performed on the port.
-   *
-   * @param device The platform-specific device name for this serial
-   * port.
-   */
-  explicit basic_serial_port(asio::io_service& io_service,
-      const char* device)
-    : basic_io_object<SerialPortService>(io_service)
-  {
-    asio::error_code ec;
-    this->get_service().open(this->get_implementation(), device, ec);
-    asio::detail::throw_error(ec, "open");
-  }
-
-  /// Construct and open a basic_serial_port.
-  /**
-   * This constructor creates and opens a serial port for the specified device
-   * name.
-   *
-   * @param io_service The io_service object that the serial port will use to
-   * dispatch handlers for any asynchronous operations performed on the port.
-   *
-   * @param device The platform-specific device name for this serial
-   * port.
-   */
-  explicit basic_serial_port(asio::io_service& io_service,
-      const std::string& device)
-    : basic_io_object<SerialPortService>(io_service)
-  {
-    asio::error_code ec;
-    this->get_service().open(this->get_implementation(), device, ec);
-    asio::detail::throw_error(ec, "open");
-  }
-
-  /// Construct a basic_serial_port on an existing native serial port.
-  /**
-   * This constructor creates a serial port object to hold an existing native
-   * serial port.
-   *
-   * @param io_service The io_service object that the serial port will use to
-   * dispatch handlers for any asynchronous operations performed on the port.
-   *
-   * @param native_serial_port A native serial port.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  basic_serial_port(asio::io_service& io_service,
-      const native_handle_type& native_serial_port)
-    : basic_io_object<SerialPortService>(io_service)
-  {
-    asio::error_code ec;
-    this->get_service().assign(this->get_implementation(),
-        native_serial_port, ec);
-    asio::detail::throw_error(ec, "assign");
-  }
-
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-  /// Move-construct a basic_serial_port from another.
-  /**
-   * This constructor moves a serial port from one object to another.
-   *
-   * @param other The other basic_serial_port object from which the move will
-   * occur.
-   *
-   * @note Following the move, the moved-from object is in the same state as if
-   * constructed using the @c basic_serial_port(io_service&) constructor.
-   */
-  basic_serial_port(basic_serial_port&& other)
-    : basic_io_object<SerialPortService>(
-        ASIO_MOVE_CAST(basic_serial_port)(other))
-  {
-  }
-
-  /// Move-assign a basic_serial_port from another.
-  /**
-   * This assignment operator moves a serial port from one object to another.
-   *
-   * @param other The other basic_serial_port object from which the move will
-   * occur.
-   *
-   * @note Following the move, the moved-from object is in the same state as if
-   * constructed using the @c basic_serial_port(io_service&) constructor.
-   */
-  basic_serial_port& operator=(basic_serial_port&& other)
-  {
-    basic_io_object<SerialPortService>::operator=(
-        ASIO_MOVE_CAST(basic_serial_port)(other));
-    return *this;
-  }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
-  /// Get a reference to the lowest layer.
-  /**
-   * This function returns a reference to the lowest layer in a stack of
-   * layers. Since a basic_serial_port cannot contain any further layers, it
-   * simply returns a reference to itself.
-   *
-   * @return A reference to the lowest layer in the stack of layers. Ownership
-   * is not transferred to the caller.
-   */
-  lowest_layer_type& lowest_layer()
-  {
-    return *this;
-  }
-
-  /// Get a const reference to the lowest layer.
-  /**
-   * This function returns a const reference to the lowest layer in a stack of
-   * layers. Since a basic_serial_port cannot contain any further layers, it
-   * simply returns a reference to itself.
-   *
-   * @return A const reference to the lowest layer in the stack of layers.
-   * Ownership is not transferred to the caller.
-   */
-  const lowest_layer_type& lowest_layer() const
-  {
-    return *this;
-  }
-
-  /// Open the serial port using the specified device name.
-  /**
-   * This function opens the serial port for the specified device name.
-   *
-   * @param device The platform-specific device name.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  void open(const std::string& device)
-  {
-    asio::error_code ec;
-    this->get_service().open(this->get_implementation(), device, ec);
-    asio::detail::throw_error(ec, "open");
-  }
-
-  /// Open the serial port using the specified device name.
-  /**
-   * This function opens the serial port using the given platform-specific
-   * device name.
-   *
-   * @param device The platform-specific device name.
-   *
-   * @param ec Set the indicate what error occurred, if any.
-   */
-  asio::error_code open(const std::string& device,
-      asio::error_code& ec)
-  {
-    return this->get_service().open(this->get_implementation(), device, ec);
-  }
-
-  /// Assign an existing native serial port to the serial port.
-  /*
-   * This function opens the serial port to hold an existing native serial port.
-   *
-   * @param native_serial_port A native serial port.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  void assign(const native_handle_type& native_serial_port)
-  {
-    asio::error_code ec;
-    this->get_service().assign(this->get_implementation(),
-        native_serial_port, ec);
-    asio::detail::throw_error(ec, "assign");
-  }
-
-  /// Assign an existing native serial port to the serial port.
-  /*
-   * This function opens the serial port to hold an existing native serial port.
-   *
-   * @param native_serial_port A native serial port.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   */
-  asio::error_code assign(const native_handle_type& native_serial_port,
-      asio::error_code& ec)
-  {
-    return this->get_service().assign(this->get_implementation(),
-        native_serial_port, ec);
-  }
-
-  /// Determine whether the serial port is open.
-  bool is_open() const
-  {
-    return this->get_service().is_open(this->get_implementation());
-  }
-
-  /// Close the serial port.
-  /**
-   * This function is used to close the serial port. Any asynchronous read or
-   * write operations will be cancelled immediately, and will complete with the
-   * asio::error::operation_aborted error.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  void close()
-  {
-    asio::error_code ec;
-    this->get_service().close(this->get_implementation(), ec);
-    asio::detail::throw_error(ec, "close");
-  }
-
-  /// Close the serial port.
-  /**
-   * This function is used to close the serial port. Any asynchronous read or
-   * write operations will be cancelled immediately, and will complete with the
-   * asio::error::operation_aborted error.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   */
-  asio::error_code close(asio::error_code& ec)
-  {
-    return this->get_service().close(this->get_implementation(), ec);
-  }
-
-  /// (Deprecated: Use native_handle().) Get the native serial port
-  /// representation.
-  /**
-   * This function may be used to obtain the underlying representation of the
-   * serial port. This is intended to allow access to native serial port
-   * functionality that is not otherwise provided.
-   */
-  native_type native()
-  {
-    return this->get_service().native_handle(this->get_implementation());
-  }
-
-  /// Get the native serial port representation.
-  /**
-   * This function may be used to obtain the underlying representation of the
-   * serial port. This is intended to allow access to native serial port
-   * functionality that is not otherwise provided.
-   */
-  native_handle_type native_handle()
-  {
-    return this->get_service().native_handle(this->get_implementation());
-  }
-
-  /// Cancel all asynchronous operations associated with the serial port.
-  /**
-   * This function causes all outstanding asynchronous read or write operations
-   * to finish immediately, and the handlers for cancelled operations will be
-   * passed the asio::error::operation_aborted error.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  void cancel()
-  {
-    asio::error_code ec;
-    this->get_service().cancel(this->get_implementation(), ec);
-    asio::detail::throw_error(ec, "cancel");
-  }
-
-  /// Cancel all asynchronous operations associated with the serial port.
-  /**
-   * This function causes all outstanding asynchronous read or write operations
-   * to finish immediately, and the handlers for cancelled operations will be
-   * passed the asio::error::operation_aborted error.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   */
-  asio::error_code cancel(asio::error_code& ec)
-  {
-    return this->get_service().cancel(this->get_implementation(), ec);
-  }
-
-  /// Send a break sequence to the serial port.
-  /**
-   * This function causes a break sequence of platform-specific duration to be
-   * sent out the serial port.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  void send_break()
-  {
-    asio::error_code ec;
-    this->get_service().send_break(this->get_implementation(), ec);
-    asio::detail::throw_error(ec, "send_break");
-  }
-
-  /// Send a break sequence to the serial port.
-  /**
-   * This function causes a break sequence of platform-specific duration to be
-   * sent out the serial port.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   */
-  asio::error_code send_break(asio::error_code& ec)
-  {
-    return this->get_service().send_break(this->get_implementation(), ec);
-  }
-
-  /// Set an option on the serial port.
-  /**
-   * This function is used to set an option on the serial port.
-   *
-   * @param option The option value to be set on the serial port.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @sa SettableSerialPortOption @n
-   * asio::serial_port_base::baud_rate @n
-   * asio::serial_port_base::flow_control @n
-   * asio::serial_port_base::parity @n
-   * asio::serial_port_base::stop_bits @n
-   * asio::serial_port_base::character_size
-   */
-  template <typename SettableSerialPortOption>
-  void set_option(const SettableSerialPortOption& option)
-  {
-    asio::error_code ec;
-    this->get_service().set_option(this->get_implementation(), option, ec);
-    asio::detail::throw_error(ec, "set_option");
-  }
-
-  /// Set an option on the serial port.
-  /**
-   * This function is used to set an option on the serial port.
-   *
-   * @param option The option value to be set on the serial port.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @sa SettableSerialPortOption @n
-   * asio::serial_port_base::baud_rate @n
-   * asio::serial_port_base::flow_control @n
-   * asio::serial_port_base::parity @n
-   * asio::serial_port_base::stop_bits @n
-   * asio::serial_port_base::character_size
-   */
-  template <typename SettableSerialPortOption>
-  asio::error_code set_option(const SettableSerialPortOption& option,
-      asio::error_code& ec)
-  {
-    return this->get_service().set_option(
-        this->get_implementation(), option, ec);
-  }
-
-  /// Get an option from the serial port.
-  /**
-   * This function is used to get the current value of an option on the serial
-   * port.
-   *
-   * @param option The option value to be obtained from the serial port.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @sa GettableSerialPortOption @n
-   * asio::serial_port_base::baud_rate @n
-   * asio::serial_port_base::flow_control @n
-   * asio::serial_port_base::parity @n
-   * asio::serial_port_base::stop_bits @n
-   * asio::serial_port_base::character_size
-   */
-  template <typename GettableSerialPortOption>
-  void get_option(GettableSerialPortOption& option)
-  {
-    asio::error_code ec;
-    this->get_service().get_option(this->get_implementation(), option, ec);
-    asio::detail::throw_error(ec, "get_option");
-  }
-
-  /// Get an option from the serial port.
-  /**
-   * This function is used to get the current value of an option on the serial
-   * port.
-   *
-   * @param option The option value to be obtained from the serial port.
-   *
-   * @param ec Set to indicate what error occured, if any.
-   *
-   * @sa GettableSerialPortOption @n
-   * asio::serial_port_base::baud_rate @n
-   * asio::serial_port_base::flow_control @n
-   * asio::serial_port_base::parity @n
-   * asio::serial_port_base::stop_bits @n
-   * asio::serial_port_base::character_size
-   */
-  template <typename GettableSerialPortOption>
-  asio::error_code get_option(GettableSerialPortOption& option,
-      asio::error_code& ec)
-  {
-    return this->get_service().get_option(
-        this->get_implementation(), option, ec);
-  }
-
-  /// Write some data to the serial port.
-  /**
-   * This function is used to write data to the serial port. The function call
-   * will block until one or more bytes of the data has been written
-   * successfully, or until an error occurs.
-   *
-   * @param buffers One or more data buffers to be written to the serial port.
-   *
-   * @returns The number of bytes written.
-   *
-   * @throws asio::system_error Thrown on failure. An error code of
-   * asio::error::eof indicates that the connection was closed by the
-   * peer.
-   *
-   * @note The write_some operation may not transmit all of the data to the
-   * peer. Consider using the @ref write function if you need to ensure that
-   * all data is written before the blocking operation completes.
-   *
-   * @par Example
-   * To write a single data buffer use the @ref buffer function as follows:
-   * @code
-   * serial_port.write_some(asio::buffer(data, size));
-   * @endcode
-   * See the @ref buffer documentation for information on writing multiple
-   * buffers in one go, and how to use it with arrays, boost::array or
-   * std::vector.
-   */
-  template <typename ConstBufferSequence>
-  std::size_t write_some(const ConstBufferSequence& buffers)
-  {
-    asio::error_code ec;
-    std::size_t s = this->get_service().write_some(
-        this->get_implementation(), buffers, ec);
-    asio::detail::throw_error(ec, "write_some");
-    return s;
-  }
-
-  /// Write some data to the serial port.
-  /**
-   * This function is used to write data to the serial port. The function call
-   * will block until one or more bytes of the data has been written
-   * successfully, or until an error occurs.
-   *
-   * @param buffers One or more data buffers to be written to the serial port.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @returns The number of bytes written. Returns 0 if an error occurred.
-   *
-   * @note The write_some operation may not transmit all of the data to the
-   * peer. Consider using the @ref write function if you need to ensure that
-   * all data is written before the blocking operation completes.
-   */
-  template <typename ConstBufferSequence>
-  std::size_t write_some(const ConstBufferSequence& buffers,
-      asio::error_code& ec)
-  {
-    return this->get_service().write_some(
-        this->get_implementation(), buffers, ec);
-  }
-
-  /// Start an asynchronous write.
-  /**
-   * This function is used to asynchronously write data to the serial port.
-   * The function call always returns immediately.
-   *
-   * @param buffers One or more data buffers to be written to the serial port.
-   * Although the buffers object may be copied as necessary, ownership of the
-   * underlying memory blocks is retained by the caller, which must guarantee
-   * that they remain valid until the handler is called.
-   *
-   * @param handler The handler to be called when the write operation completes.
-   * Copies will be made of the handler as required. The function signature of
-   * the handler must be:
-   * @code void handler(
-   *   const asio::error_code& error, // Result of operation.
-   *   std::size_t bytes_transferred           // Number of bytes written.
-   * ); @endcode
-   * Regardless of whether the asynchronous operation completes immediately or
-   * not, the handler will not be invoked from within this function. Invocation
-   * of the handler will be performed in a manner equivalent to using
-   * asio::io_service::post().
-   *
-   * @note The write operation may not transmit all of the data to the peer.
-   * Consider using the @ref async_write function if you need to ensure that all
-   * data is written before the asynchronous operation completes.
-   *
-   * @par Example
-   * To write a single data buffer use the @ref buffer function as follows:
-   * @code
-   * serial_port.async_write_some(asio::buffer(data, size), handler);
-   * @endcode
-   * See the @ref buffer documentation for information on writing multiple
-   * buffers in one go, and how to use it with arrays, boost::array or
-   * std::vector.
-   */
-  template <typename ConstBufferSequence, typename WriteHandler>
-  ASIO_INITFN_RESULT_TYPE(WriteHandler,
-      void (asio::error_code, std::size_t))
-  async_write_some(const ConstBufferSequence& buffers,
-      ASIO_MOVE_ARG(WriteHandler) handler)
-  {
-    // If you get an error on the following line it means that your handler does
-    // not meet the documented type requirements for a WriteHandler.
-    ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
-    return this->get_service().async_write_some(this->get_implementation(),
-        buffers, ASIO_MOVE_CAST(WriteHandler)(handler));
-  }
-
-  /// Read some data from the serial port.
-  /**
-   * This function is used to read data from the serial port. The function
-   * call will block until one or more bytes of data has been read successfully,
-   * or until an error occurs.
-   *
-   * @param buffers One or more buffers into which the data will be read.
-   *
-   * @returns The number of bytes read.
-   *
-   * @throws asio::system_error Thrown on failure. An error code of
-   * asio::error::eof indicates that the connection was closed by the
-   * peer.
-   *
-   * @note The read_some operation may not read all of the requested number of
-   * bytes. Consider using the @ref read function if you need to ensure that
-   * the requested amount of data is read before the blocking operation
-   * completes.
-   *
-   * @par Example
-   * To read into a single data buffer use the @ref buffer function as follows:
-   * @code
-   * serial_port.read_some(asio::buffer(data, size));
-   * @endcode
-   * See the @ref buffer documentation for information on reading into multiple
-   * buffers in one go, and how to use it with arrays, boost::array or
-   * std::vector.
-   */
-  template <typename MutableBufferSequence>
-  std::size_t read_some(const MutableBufferSequence& buffers)
-  {
-    asio::error_code ec;
-    std::size_t s = this->get_service().read_some(
-        this->get_implementation(), buffers, ec);
-    asio::detail::throw_error(ec, "read_some");
-    return s;
-  }
-
-  /// Read some data from the serial port.
-  /**
-   * This function is used to read data from the serial port. The function
-   * call will block until one or more bytes of data has been read successfully,
-   * or until an error occurs.
-   *
-   * @param buffers One or more buffers into which the data will be read.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @returns The number of bytes read. Returns 0 if an error occurred.
-   *
-   * @note The read_some operation may not read all of the requested number of
-   * bytes. Consider using the @ref read function if you need to ensure that
-   * the requested amount of data is read before the blocking operation
-   * completes.
-   */
-  template <typename MutableBufferSequence>
-  std::size_t read_some(const MutableBufferSequence& buffers,
-      asio::error_code& ec)
-  {
-    return this->get_service().read_some(
-        this->get_implementation(), buffers, ec);
-  }
-
-  /// Start an asynchronous read.
-  /**
-   * This function is used to asynchronously read data from the serial port.
-   * The function call always returns immediately.
-   *
-   * @param buffers One or more buffers into which the data will be read.
-   * Although the buffers object may be copied as necessary, ownership of the
-   * underlying memory blocks is retained by the caller, which must guarantee
-   * that they remain valid until the handler is called.
-   *
-   * @param handler The handler to be called when the read operation completes.
-   * Copies will be made of the handler as required. The function signature of
-   * the handler must be:
-   * @code void handler(
-   *   const asio::error_code& error, // Result of operation.
-   *   std::size_t bytes_transferred           // Number of bytes read.
-   * ); @endcode
-   * Regardless of whether the asynchronous operation completes immediately or
-   * not, the handler will not be invoked from within this function. Invocation
-   * of the handler will be performed in a manner equivalent to using
-   * asio::io_service::post().
-   *
-   * @note The read operation may not read all of the requested number of bytes.
-   * Consider using the @ref async_read function if you need to ensure that the
-   * requested amount of data is read before the asynchronous operation
-   * completes.
-   *
-   * @par Example
-   * To read into a single data buffer use the @ref buffer function as follows:
-   * @code
-   * serial_port.async_read_some(asio::buffer(data, size), handler);
-   * @endcode
-   * See the @ref buffer documentation for information on reading into multiple
-   * buffers in one go, and how to use it with arrays, boost::array or
-   * std::vector.
-   */
-  template <typename MutableBufferSequence, typename ReadHandler>
-  ASIO_INITFN_RESULT_TYPE(ReadHandler,
-      void (asio::error_code, std::size_t))
-  async_read_some(const MutableBufferSequence& buffers,
-      ASIO_MOVE_ARG(ReadHandler) handler)
-  {
-    // If you get an error on the following line it means that your handler does
-    // not meet the documented type requirements for a ReadHandler.
-    ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
-    return this->get_service().async_read_some(this->get_implementation(),
-        buffers, ASIO_MOVE_CAST(ReadHandler)(handler));
-  }
-};
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(ASIO_HAS_SERIAL_PORT)
-       //   || defined(GENERATING_DOCUMENTATION)
-
-#endif // ASIO_BASIC_SERIAL_PORT_HPP
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_signal_set.hpp b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_signal_set.hpp
deleted file mode 100644
index 2dd71ce..0000000
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_signal_set.hpp
+++ /dev/null
@@ -1,384 +0,0 @@
-//
-// basic_signal_set.hpp
-// ~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef ASIO_BASIC_SIGNAL_SET_HPP
-#define ASIO_BASIC_SIGNAL_SET_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#include "asio/basic_io_object.hpp"
-#include "asio/detail/handler_type_requirements.hpp"
-#include "asio/detail/throw_error.hpp"
-#include "asio/error.hpp"
-#include "asio/signal_set_service.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-/// Provides signal functionality.
-/**
- * The basic_signal_set class template provides the ability to perform an
- * asynchronous wait for one or more signals to occur.
- *
- * Most applications will use the asio::signal_set typedef.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- *
- * @par Example
- * Performing an asynchronous wait:
- * @code
- * void handler(
- *     const asio::error_code& error,
- *     int signal_number)
- * {
- *   if (!error)
- *   {
- *     // A signal occurred.
- *   }
- * }
- *
- * ...
- *
- * // Construct a signal set registered for process termination.
- * asio::signal_set signals(io_service, SIGINT, SIGTERM);
- *
- * // Start an asynchronous wait for one of the signals to occur.
- * signals.async_wait(handler);
- * @endcode
- *
- * @par Queueing of signal notifications
- *
- * If a signal is registered with a signal_set, and the signal occurs when
- * there are no waiting handlers, then the signal notification is queued. The
- * next async_wait operation on that signal_set will dequeue the notification.
- * If multiple notifications are queued, subsequent async_wait operations
- * dequeue them one at a time. Signal notifications are dequeued in order of
- * ascending signal number.
- *
- * If a signal number is removed from a signal_set (using the @c remove or @c
- * erase member functions) then any queued notifications for that signal are
- * discarded.
- *
- * @par Multiple registration of signals
- *
- * The same signal number may be registered with different signal_set objects.
- * When the signal occurs, one handler is called for each signal_set object.
- *
- * Note that multiple registration only works for signals that are registered
- * using Asio. The application must not also register a signal handler using
- * functions such as @c signal() or @c sigaction().
- *
- * @par Signal masking on POSIX platforms
- *
- * POSIX allows signals to be blocked using functions such as @c sigprocmask()
- * and @c pthread_sigmask(). For signals to be delivered, programs must ensure
- * that any signals registered using signal_set objects are unblocked in at
- * least one thread.
- */
-template <typename SignalSetService = signal_set_service>
-class basic_signal_set
-  : public basic_io_object<SignalSetService>
-{
-public:
-  /// Construct a signal set without adding any signals.
-  /**
-   * This constructor creates a signal set without registering for any signals.
-   *
-   * @param io_service The io_service object that the signal set will use to
-   * dispatch handlers for any asynchronous operations performed on the set.
-   */
-  explicit basic_signal_set(asio::io_service& io_service)
-    : basic_io_object<SignalSetService>(io_service)
-  {
-  }
-
-  /// Construct a signal set and add one signal.
-  /**
-   * This constructor creates a signal set and registers for one signal.
-   *
-   * @param io_service The io_service object that the signal set will use to
-   * dispatch handlers for any asynchronous operations performed on the set.
-   *
-   * @param signal_number_1 The signal number to be added.
-   *
-   * @note This constructor is equivalent to performing:
-   * @code asio::signal_set signals(io_service);
-   * signals.add(signal_number_1); @endcode
-   */
-  basic_signal_set(asio::io_service& io_service, int signal_number_1)
-    : basic_io_object<SignalSetService>(io_service)
-  {
-    asio::error_code ec;
-    this->service.add(this->implementation, signal_number_1, ec);
-    asio::detail::throw_error(ec, "add");
-  }
-
-  /// Construct a signal set and add two signals.
-  /**
-   * This constructor creates a signal set and registers for two signals.
-   *
-   * @param io_service The io_service object that the signal set will use to
-   * dispatch handlers for any asynchronous operations performed on the set.
-   *
-   * @param signal_number_1 The first signal number to be added.
-   *
-   * @param signal_number_2 The second signal number to be added.
-   *
-   * @note This constructor is equivalent to performing:
-   * @code asio::signal_set signals(io_service);
-   * signals.add(signal_number_1);
-   * signals.add(signal_number_2); @endcode
-   */
-  basic_signal_set(asio::io_service& io_service, int signal_number_1,
-      int signal_number_2)
-    : basic_io_object<SignalSetService>(io_service)
-  {
-    asio::error_code ec;
-    this->service.add(this->implementation, signal_number_1, ec);
-    asio::detail::throw_error(ec, "add");
-    this->service.add(this->implementation, signal_number_2, ec);
-    asio::detail::throw_error(ec, "add");
-  }
-
-  /// Construct a signal set and add three signals.
-  /**
-   * This constructor creates a signal set and registers for three signals.
-   *
-   * @param io_service The io_service object that the signal set will use to
-   * dispatch handlers for any asynchronous operations performed on the set.
-   *
-   * @param signal_number_1 The first signal number to be added.
-   *
-   * @param signal_number_2 The second signal number to be added.
-   *
-   * @param signal_number_3 The third signal number to be added.
-   *
-   * @note This constructor is equivalent to performing:
-   * @code asio::signal_set signals(io_service);
-   * signals.add(signal_number_1);
-   * signals.add(signal_number_2);
-   * signals.add(signal_number_3); @endcode
-   */
-  basic_signal_set(asio::io_service& io_service, int signal_number_1,
-      int signal_number_2, int signal_number_3)
-    : basic_io_object<SignalSetService>(io_service)
-  {
-    asio::error_code ec;
-    this->service.add(this->implementation, signal_number_1, ec);
-    asio::detail::throw_error(ec, "add");
-    this->service.add(this->implementation, signal_number_2, ec);
-    asio::detail::throw_error(ec, "add");
-    this->service.add(this->implementation, signal_number_3, ec);
-    asio::detail::throw_error(ec, "add");
-  }
-
-  /// Add a signal to a signal_set.
-  /**
-   * This function adds the specified signal to the set. It has no effect if the
-   * signal is already in the set.
-   *
-   * @param signal_number The signal to be added to the set.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  void add(int signal_number)
-  {
-    asio::error_code ec;
-    this->service.add(this->implementation, signal_number, ec);
-    asio::detail::throw_error(ec, "add");
-  }
-
-  /// Add a signal to a signal_set.
-  /**
-   * This function adds the specified signal to the set. It has no effect if the
-   * signal is already in the set.
-   *
-   * @param signal_number The signal to be added to the set.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   */
-  asio::error_code add(int signal_number,
-      asio::error_code& ec)
-  {
-    return this->service.add(this->implementation, signal_number, ec);
-  }
-
-  /// Remove a signal from a signal_set.
-  /**
-   * This function removes the specified signal from the set. It has no effect
-   * if the signal is not in the set.
-   *
-   * @param signal_number The signal to be removed from the set.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @note Removes any notifications that have been queued for the specified
-   * signal number.
-   */
-  void remove(int signal_number)
-  {
-    asio::error_code ec;
-    this->service.remove(this->implementation, signal_number, ec);
-    asio::detail::throw_error(ec, "remove");
-  }
-
-  /// Remove a signal from a signal_set.
-  /**
-   * This function removes the specified signal from the set. It has no effect
-   * if the signal is not in the set.
-   *
-   * @param signal_number The signal to be removed from the set.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @note Removes any notifications that have been queued for the specified
-   * signal number.
-   */
-  asio::error_code remove(int signal_number,
-      asio::error_code& ec)
-  {
-    return this->service.remove(this->implementation, signal_number, ec);
-  }
-
-  /// Remove all signals from a signal_set.
-  /**
-   * This function removes all signals from the set. It has no effect if the set
-   * is already empty.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @note Removes all queued notifications.
-   */
-  void clear()
-  {
-    asio::error_code ec;
-    this->service.clear(this->implementation, ec);
-    asio::detail::throw_error(ec, "clear");
-  }
-
-  /// Remove all signals from a signal_set.
-  /**
-   * This function removes all signals from the set. It has no effect if the set
-   * is already empty.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @note Removes all queued notifications.
-   */
-  asio::error_code clear(asio::error_code& ec)
-  {
-    return this->service.clear(this->implementation, ec);
-  }
-
-  /// Cancel all operations associated with the signal set.
-  /**
-   * This function forces the completion of any pending asynchronous wait
-   * operations against the signal set. The handler for each cancelled
-   * operation will be invoked with the asio::error::operation_aborted
-   * error code.
-   *
-   * Cancellation does not alter the set of registered signals.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @note If a registered signal occurred before cancel() is called, then the
-   * handlers for asynchronous wait operations will:
-   *
-   * @li have already been invoked; or
-   *
-   * @li have been queued for invocation in the near future.
-   *
-   * These handlers can no longer be cancelled, and therefore are passed an
-   * error code that indicates the successful completion of the wait operation.
-   */
-  void cancel()
-  {
-    asio::error_code ec;
-    this->service.cancel(this->implementation, ec);
-    asio::detail::throw_error(ec, "cancel");
-  }
-
-  /// Cancel all operations associated with the signal set.
-  /**
-   * This function forces the completion of any pending asynchronous wait
-   * operations against the signal set. The handler for each cancelled
-   * operation will be invoked with the asio::error::operation_aborted
-   * error code.
-   *
-   * Cancellation does not alter the set of registered signals.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @note If a registered signal occurred before cancel() is called, then the
-   * handlers for asynchronous wait operations will:
-   *
-   * @li have already been invoked; or
-   *
-   * @li have been queued for invocation in the near future.
-   *
-   * These handlers can no longer be cancelled, and therefore are passed an
-   * error code that indicates the successful completion of the wait operation.
-   */
-  asio::error_code cancel(asio::error_code& ec)
-  {
-    return this->service.cancel(this->implementation, ec);
-  }
-
-  /// Start an asynchronous operation to wait for a signal to be delivered.
-  /**
-   * This function may be used to initiate an asynchronous wait against the
-   * signal set. It always returns immediately.
-   *
-   * For each call to async_wait(), the supplied handler will be called exactly
-   * once. The handler will be called when:
-   *
-   * @li One of the registered signals in the signal set occurs; or
-   *
-   * @li The signal set was cancelled, in which case the handler is passed the
-   * error code asio::error::operation_aborted.
-   *
-   * @param handler The handler to be called when the signal occurs. Copies
-   * will be made of the handler as required. The function signature of the
-   * handler must be:
-   * @code void handler(
-   *   const asio::error_code& error, // Result of operation.
-   *   int signal_number // Indicates which signal occurred.
-   * ); @endcode
-   * Regardless of whether the asynchronous operation completes immediately or
-   * not, the handler will not be invoked from within this function. Invocation
-   * of the handler will be performed in a manner equivalent to using
-   * asio::io_service::post().
-   */
-  template <typename SignalHandler>
-  ASIO_INITFN_RESULT_TYPE(SignalHandler,
-      void (asio::error_code, int))
-  async_wait(ASIO_MOVE_ARG(SignalHandler) handler)
-  {
-    // If you get an error on the following line it means that your handler does
-    // not meet the documented type requirements for a SignalHandler.
-    ASIO_SIGNAL_HANDLER_CHECK(SignalHandler, handler) type_check;
-
-    return this->service.async_wait(this->implementation,
-        ASIO_MOVE_CAST(SignalHandler)(handler));
-  }
-};
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_BASIC_SIGNAL_SET_HPP
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_socket.hpp b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_socket.hpp
deleted file mode 100644
index be4fb3c..0000000
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_socket.hpp
+++ /dev/null
@@ -1,1518 +0,0 @@
-//
-// basic_socket.hpp
-// ~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef ASIO_BASIC_SOCKET_HPP
-#define ASIO_BASIC_SOCKET_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/async_result.hpp"
-#include "asio/basic_io_object.hpp"
-#include "asio/detail/handler_type_requirements.hpp"
-#include "asio/detail/throw_error.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/error.hpp"
-#include "asio/socket_base.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-/// Provides socket functionality.
-/**
- * The basic_socket class template provides functionality that is common to both
- * stream-oriented and datagram-oriented sockets.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-template <typename Protocol, typename SocketService>
-class basic_socket
-  : public basic_io_object<SocketService>,
-    public socket_base
-{
-public:
-  /// (Deprecated: Use native_handle_type.) The native representation of a
-  /// socket.
-  typedef typename SocketService::native_handle_type native_type;
-
-  /// The native representation of a socket.
-  typedef typename SocketService::native_handle_type native_handle_type;
-
-  /// The protocol type.
-  typedef Protocol protocol_type;
-
-  /// The endpoint type.
-  typedef typename Protocol::endpoint endpoint_type;
-
-  /// A basic_socket is always the lowest layer.
-  typedef basic_socket<Protocol, SocketService> lowest_layer_type;
-
-  /// Construct a basic_socket without opening it.
-  /**
-   * This constructor creates a socket without opening it.
-   *
-   * @param io_service The io_service object that the socket will use to
-   * dispatch handlers for any asynchronous operations performed on the socket.
-   */
-  explicit basic_socket(asio::io_service& io_service)
-    : basic_io_object<SocketService>(io_service)
-  {
-  }
-
-  /// Construct and open a basic_socket.
-  /**
-   * This constructor creates and opens a socket.
-   *
-   * @param io_service The io_service object that the socket will use to
-   * dispatch handlers for any asynchronous operations performed on the socket.
-   *
-   * @param protocol An object specifying protocol parameters to be used.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  basic_socket(asio::io_service& io_service,
-      const protocol_type& protocol)
-    : basic_io_object<SocketService>(io_service)
-  {
-    asio::error_code ec;
-    this->get_service().open(this->get_implementation(), protocol, ec);
-    asio::detail::throw_error(ec, "open");
-  }
-
-  /// Construct a basic_socket, opening it and binding it to the given local
-  /// endpoint.
-  /**
-   * This constructor creates a socket and automatically opens it bound to the
-   * specified endpoint on the local machine. The protocol used is the protocol
-   * associated with the given endpoint.
-   *
-   * @param io_service The io_service object that the socket will use to
-   * dispatch handlers for any asynchronous operations performed on the socket.
-   *
-   * @param endpoint An endpoint on the local machine to which the socket will
-   * be bound.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  basic_socket(asio::io_service& io_service,
-      const endpoint_type& endpoint)
-    : basic_io_object<SocketService>(io_service)
-  {
-    asio::error_code ec;
-    const protocol_type protocol = endpoint.protocol();
-    this->get_service().open(this->get_implementation(), protocol, ec);
-    asio::detail::throw_error(ec, "open");
-    this->get_service().bind(this->get_implementation(), endpoint, ec);
-    asio::detail::throw_error(ec, "bind");
-  }
-
-  /// Construct a basic_socket on an existing native socket.
-  /**
-   * This constructor creates a socket object to hold an existing native socket.
-   *
-   * @param io_service The io_service object that the socket will use to
-   * dispatch handlers for any asynchronous operations performed on the socket.
-   *
-   * @param protocol An object specifying protocol parameters to be used.
-   *
-   * @param native_socket A native socket.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  basic_socket(asio::io_service& io_service,
-      const protocol_type& protocol, const native_handle_type& native_socket)
-    : basic_io_object<SocketService>(io_service)
-  {
-    asio::error_code ec;
-    this->get_service().assign(this->get_implementation(),
-        protocol, native_socket, ec);
-    asio::detail::throw_error(ec, "assign");
-  }
-
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-  /// Move-construct a basic_socket from another.
-  /**
-   * This constructor moves a socket from one object to another.
-   *
-   * @param other The other basic_socket object from which the move will
-   * occur.
-   *
-   * @note Following the move, the moved-from object is in the same state as if
-   * constructed using the @c basic_socket(io_service&) constructor.
-   */
-  basic_socket(basic_socket&& other)
-    : basic_io_object<SocketService>(
-        ASIO_MOVE_CAST(basic_socket)(other))
-  {
-  }
-
-  /// Move-assign a basic_socket from another.
-  /**
-   * This assignment operator moves a socket from one object to another.
-   *
-   * @param other The other basic_socket object from which the move will
-   * occur.
-   *
-   * @note Following the move, the moved-from object is in the same state as if
-   * constructed using the @c basic_socket(io_service&) constructor.
-   */
-  basic_socket& operator=(basic_socket&& other)
-  {
-    basic_io_object<SocketService>::operator=(
-        ASIO_MOVE_CAST(basic_socket)(other));
-    return *this;
-  }
-
-  // All sockets have access to each other's implementations.
-  template <typename Protocol1, typename SocketService1>
-  friend class basic_socket;
-
-  /// Move-construct a basic_socket from a socket of another protocol type.
-  /**
-   * This constructor moves a socket from one object to another.
-   *
-   * @param other The other basic_socket object from which the move will
-   * occur.
-   *
-   * @note Following the move, the moved-from object is in the same state as if
-   * constructed using the @c basic_socket(io_service&) constructor.
-   */
-  template <typename Protocol1, typename SocketService1>
-  basic_socket(basic_socket<Protocol1, SocketService1>&& other,
-      typename enable_if<is_convertible<Protocol1, Protocol>::value>::type* = 0)
-    : basic_io_object<SocketService>(other.get_io_service())
-  {
-    this->get_service().template converting_move_construct<Protocol1>(
-        this->get_implementation(), other.get_implementation());
-  }
-
-  /// Move-assign a basic_socket from a socket of another protocol type.
-  /**
-   * This assignment operator moves a socket from one object to another.
-   *
-   * @param other The other basic_socket object from which the move will
-   * occur.
-   *
-   * @note Following the move, the moved-from object is in the same state as if
-   * constructed using the @c basic_socket(io_service&) constructor.
-   */
-  template <typename Protocol1, typename SocketService1>
-  typename enable_if<is_convertible<Protocol1, Protocol>::value,
-      basic_socket>::type& operator=(
-        basic_socket<Protocol1, SocketService1>&& other)
-  {
-    basic_socket tmp(ASIO_MOVE_CAST2(basic_socket<
-            Protocol1, SocketService1>)(other));
-    basic_io_object<SocketService>::operator=(
-        ASIO_MOVE_CAST(basic_socket)(tmp));
-    return *this;
-  }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
-  /// Get a reference to the lowest layer.
-  /**
-   * This function returns a reference to the lowest layer in a stack of
-   * layers. Since a basic_socket cannot contain any further layers, it simply
-   * returns a reference to itself.
-   *
-   * @return A reference to the lowest layer in the stack of layers. Ownership
-   * is not transferred to the caller.
-   */
-  lowest_layer_type& lowest_layer()
-  {
-    return *this;
-  }
-
-  /// Get a const reference to the lowest layer.
-  /**
-   * This function returns a const reference to the lowest layer in a stack of
-   * layers. Since a basic_socket cannot contain any further layers, it simply
-   * returns a reference to itself.
-   *
-   * @return A const reference to the lowest layer in the stack of layers.
-   * Ownership is not transferred to the caller.
-   */
-  const lowest_layer_type& lowest_layer() const
-  {
-    return *this;
-  }
-
-  /// Open the socket using the specified protocol.
-  /**
-   * This function opens the socket so that it will use the specified protocol.
-   *
-   * @param protocol An object specifying protocol parameters to be used.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @par Example
-   * @code
-   * asio::ip::tcp::socket socket(io_service);
-   * socket.open(asio::ip::tcp::v4());
-   * @endcode
-   */
-  void open(const protocol_type& protocol = protocol_type())
-  {
-    asio::error_code ec;
-    this->get_service().open(this->get_implementation(), protocol, ec);
-    asio::detail::throw_error(ec, "open");
-  }
-
-  /// Open the socket using the specified protocol.
-  /**
-   * This function opens the socket so that it will use the specified protocol.
-   *
-   * @param protocol An object specifying which protocol is to be used.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @par Example
-   * @code
-   * asio::ip::tcp::socket socket(io_service);
-   * asio::error_code ec;
-   * socket.open(asio::ip::tcp::v4(), ec);
-   * if (ec)
-   * {
-   *   // An error occurred.
-   * }
-   * @endcode
-   */
-  asio::error_code open(const protocol_type& protocol,
-      asio::error_code& ec)
-  {
-    return this->get_service().open(this->get_implementation(), protocol, ec);
-  }
-
-  /// Assign an existing native socket to the socket.
-  /*
-   * This function opens the socket to hold an existing native socket.
-   *
-   * @param protocol An object specifying which protocol is to be used.
-   *
-   * @param native_socket A native socket.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  void assign(const protocol_type& protocol,
-      const native_handle_type& native_socket)
-  {
-    asio::error_code ec;
-    this->get_service().assign(this->get_implementation(),
-        protocol, native_socket, ec);
-    asio::detail::throw_error(ec, "assign");
-  }
-
-  /// Assign an existing native socket to the socket.
-  /*
-   * This function opens the socket to hold an existing native socket.
-   *
-   * @param protocol An object specifying which protocol is to be used.
-   *
-   * @param native_socket A native socket.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   */
-  asio::error_code assign(const protocol_type& protocol,
-      const native_handle_type& native_socket, asio::error_code& ec)
-  {
-    return this->get_service().assign(this->get_implementation(),
-        protocol, native_socket, ec);
-  }
-
-  /// Determine whether the socket is open.
-  bool is_open() const
-  {
-    return this->get_service().is_open(this->get_implementation());
-  }
-
-  /// Close the socket.
-  /**
-   * This function is used to close the socket. Any asynchronous send, receive
-   * or connect operations will be cancelled immediately, and will complete
-   * with the asio::error::operation_aborted error.
-   *
-   * @throws asio::system_error Thrown on failure. Note that, even if
-   * the function indicates an error, the underlying descriptor is closed.
-   *
-   * @note For portable behaviour with respect to graceful closure of a
-   * connected socket, call shutdown() before closing the socket.
-   */
-  void close()
-  {
-    asio::error_code ec;
-    this->get_service().close(this->get_implementation(), ec);
-    asio::detail::throw_error(ec, "close");
-  }
-
-  /// Close the socket.
-  /**
-   * This function is used to close the socket. Any asynchronous send, receive
-   * or connect operations will be cancelled immediately, and will complete
-   * with the asio::error::operation_aborted error.
-   *
-   * @param ec Set to indicate what error occurred, if any. Note that, even if
-   * the function indicates an error, the underlying descriptor is closed.
-   *
-   * @par Example
-   * @code
-   * asio::ip::tcp::socket socket(io_service);
-   * ...
-   * asio::error_code ec;
-   * socket.close(ec);
-   * if (ec)
-   * {
-   *   // An error occurred.
-   * }
-   * @endcode
-   *
-   * @note For portable behaviour with respect to graceful closure of a
-   * connected socket, call shutdown() before closing the socket.
-   */
-  asio::error_code close(asio::error_code& ec)
-  {
-    return this->get_service().close(this->get_implementation(), ec);
-  }
-
-  /// (Deprecated: Use native_handle().) Get the native socket representation.
-  /**
-   * This function may be used to obtain the underlying representation of the
-   * socket. This is intended to allow access to native socket functionality
-   * that is not otherwise provided.
-   */
-  native_type native()
-  {
-    return this->get_service().native_handle(this->get_implementation());
-  }
-
-  /// Get the native socket representation.
-  /**
-   * This function may be used to obtain the underlying representation of the
-   * socket. This is intended to allow access to native socket functionality
-   * that is not otherwise provided.
-   */
-  native_handle_type native_handle()
-  {
-    return this->get_service().native_handle(this->get_implementation());
-  }
-
-  /// Cancel all asynchronous operations associated with the socket.
-  /**
-   * This function causes all outstanding asynchronous connect, send and receive
-   * operations to finish immediately, and the handlers for cancelled operations
-   * will be passed the asio::error::operation_aborted error.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @note Calls to cancel() will always fail with
-   * asio::error::operation_not_supported when run on Windows XP, Windows
-   * Server 2003, and earlier versions of Windows, unless
-   * ASIO_ENABLE_CANCELIO is defined. However, the CancelIo function has
-   * two issues that should be considered before enabling its use:
-   *
-   * @li It will only cancel asynchronous operations that were initiated in the
-   * current thread.
-   *
-   * @li It can appear to complete without error, but the request to cancel the
-   * unfinished operations may be silently ignored by the operating system.
-   * Whether it works or not seems to depend on the drivers that are installed.
-   *
-   * For portable cancellation, consider using one of the following
-   * alternatives:
-   *
-   * @li Disable asio's I/O completion port backend by defining
-   * ASIO_DISABLE_IOCP.
-   *
-   * @li Use the close() function to simultaneously cancel the outstanding
-   * operations and close the socket.
-   *
-   * When running on Windows Vista, Windows Server 2008, and later, the
-   * CancelIoEx function is always used. This function does not have the
-   * problems described above.
-   */
-#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1400) \
-  && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600) \
-  && !defined(ASIO_ENABLE_CANCELIO)
-  __declspec(deprecated("By default, this function always fails with "
-        "operation_not_supported when used on Windows XP, Windows Server 2003, "
-        "or earlier. Consult documentation for details."))
-#endif
-  void cancel()
-  {
-    asio::error_code ec;
-    this->get_service().cancel(this->get_implementation(), ec);
-    asio::detail::throw_error(ec, "cancel");
-  }
-
-  /// Cancel all asynchronous operations associated with the socket.
-  /**
-   * This function causes all outstanding asynchronous connect, send and receive
-   * operations to finish immediately, and the handlers for cancelled operations
-   * will be passed the asio::error::operation_aborted error.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @note Calls to cancel() will always fail with
-   * asio::error::operation_not_supported when run on Windows XP, Windows
-   * Server 2003, and earlier versions of Windows, unless
-   * ASIO_ENABLE_CANCELIO is defined. However, the CancelIo function has
-   * two issues that should be considered before enabling its use:
-   *
-   * @li It will only cancel asynchronous operations that were initiated in the
-   * current thread.
-   *
-   * @li It can appear to complete without error, but the request to cancel the
-   * unfinished operations may be silently ignored by the operating system.
-   * Whether it works or not seems to depend on the drivers that are installed.
-   *
-   * For portable cancellation, consider using one of the following
-   * alternatives:
-   *
-   * @li Disable asio's I/O completion port backend by defining
-   * ASIO_DISABLE_IOCP.
-   *
-   * @li Use the close() function to simultaneously cancel the outstanding
-   * operations and close the socket.
-   *
-   * When running on Windows Vista, Windows Server 2008, and later, the
-   * CancelIoEx function is always used. This function does not have the
-   * problems described above.
-   */
-#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1400) \
-  && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600) \
-  && !defined(ASIO_ENABLE_CANCELIO)
-  __declspec(deprecated("By default, this function always fails with "
-        "operation_not_supported when used on Windows XP, Windows Server 2003, "
-        "or earlier. Consult documentation for details."))
-#endif
-  asio::error_code cancel(asio::error_code& ec)
-  {
-    return this->get_service().cancel(this->get_implementation(), ec);
-  }
-
-  /// Determine whether the socket is at the out-of-band data mark.
-  /**
-   * This function is used to check whether the socket input is currently
-   * positioned at the out-of-band data mark.
-   *
-   * @return A bool indicating whether the socket is at the out-of-band data
-   * mark.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  bool at_mark() const
-  {
-    asio::error_code ec;
-    bool b = this->get_service().at_mark(this->get_implementation(), ec);
-    asio::detail::throw_error(ec, "at_mark");
-    return b;
-  }
-
-  /// Determine whether the socket is at the out-of-band data mark.
-  /**
-   * This function is used to check whether the socket input is currently
-   * positioned at the out-of-band data mark.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @return A bool indicating whether the socket is at the out-of-band data
-   * mark.
-   */
-  bool at_mark(asio::error_code& ec) const
-  {
-    return this->get_service().at_mark(this->get_implementation(), ec);
-  }
-
-  /// Determine the number of bytes available for reading.
-  /**
-   * This function is used to determine the number of bytes that may be read
-   * without blocking.
-   *
-   * @return The number of bytes that may be read without blocking, or 0 if an
-   * error occurs.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  std::size_t available() const
-  {
-    asio::error_code ec;
-    std::size_t s = this->get_service().available(
-        this->get_implementation(), ec);
-    asio::detail::throw_error(ec, "available");
-    return s;
-  }
-
-  /// Determine the number of bytes available for reading.
-  /**
-   * This function is used to determine the number of bytes that may be read
-   * without blocking.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @return The number of bytes that may be read without blocking, or 0 if an
-   * error occurs.
-   */
-  std::size_t available(asio::error_code& ec) const
-  {
-    return this->get_service().available(this->get_implementation(), ec);
-  }
-
-  /// Bind the socket to the given local endpoint.
-  /**
-   * This function binds the socket to the specified endpoint on the local
-   * machine.
-   *
-   * @param endpoint An endpoint on the local machine to which the socket will
-   * be bound.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @par Example
-   * @code
-   * asio::ip::tcp::socket socket(io_service);
-   * socket.open(asio::ip::tcp::v4());
-   * socket.bind(asio::ip::tcp::endpoint(
-   *       asio::ip::tcp::v4(), 12345));
-   * @endcode
-   */
-  void bind(const endpoint_type& endpoint)
-  {
-    asio::error_code ec;
-    this->get_service().bind(this->get_implementation(), endpoint, ec);
-    asio::detail::throw_error(ec, "bind");
-  }
-
-  /// Bind the socket to the given local endpoint.
-  /**
-   * This function binds the socket to the specified endpoint on the local
-   * machine.
-   *
-   * @param endpoint An endpoint on the local machine to which the socket will
-   * be bound.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @par Example
-   * @code
-   * asio::ip::tcp::socket socket(io_service);
-   * socket.open(asio::ip::tcp::v4());
-   * asio::error_code ec;
-   * socket.bind(asio::ip::tcp::endpoint(
-   *       asio::ip::tcp::v4(), 12345), ec);
-   * if (ec)
-   * {
-   *   // An error occurred.
-   * }
-   * @endcode
-   */
-  asio::error_code bind(const endpoint_type& endpoint,
-      asio::error_code& ec)
-  {
-    return this->get_service().bind(this->get_implementation(), endpoint, ec);
-  }
-
-  /// Connect the socket to the specified endpoint.
-  /**
-   * This function is used to connect a socket to the specified remote endpoint.
-   * The function call will block until the connection is successfully made or
-   * an error occurs.
-   *
-   * The socket is automatically opened if it is not already open. If the
-   * connect fails, and the socket was automatically opened, the socket is
-   * not returned to the closed state.
-   *
-   * @param peer_endpoint The remote endpoint to which the socket will be
-   * connected.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @par Example
-   * @code
-   * asio::ip::tcp::socket socket(io_service);
-   * asio::ip::tcp::endpoint endpoint(
-   *     asio::ip::address::from_string("1.2.3.4"), 12345);
-   * socket.connect(endpoint);
-   * @endcode
-   */
-  void connect(const endpoint_type& peer_endpoint)
-  {
-    asio::error_code ec;
-    if (!is_open())
-    {
-      this->get_service().open(this->get_implementation(),
-          peer_endpoint.protocol(), ec);
-      asio::detail::throw_error(ec, "connect");
-    }
-    this->get_service().connect(this->get_implementation(), peer_endpoint, ec);
-    asio::detail::throw_error(ec, "connect");
-  }
-
-  /// Connect the socket to the specified endpoint.
-  /**
-   * This function is used to connect a socket to the specified remote endpoint.
-   * The function call will block until the connection is successfully made or
-   * an error occurs.
-   *
-   * The socket is automatically opened if it is not already open. If the
-   * connect fails, and the socket was automatically opened, the socket is
-   * not returned to the closed state.
-   *
-   * @param peer_endpoint The remote endpoint to which the socket will be
-   * connected.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @par Example
-   * @code
-   * asio::ip::tcp::socket socket(io_service);
-   * asio::ip::tcp::endpoint endpoint(
-   *     asio::ip::address::from_string("1.2.3.4"), 12345);
-   * asio::error_code ec;
-   * socket.connect(endpoint, ec);
-   * if (ec)
-   * {
-   *   // An error occurred.
-   * }
-   * @endcode
-   */
-  asio::error_code connect(const endpoint_type& peer_endpoint,
-      asio::error_code& ec)
-  {
-    if (!is_open())
-    {
-      if (this->get_service().open(this->get_implementation(),
-            peer_endpoint.protocol(), ec))
-      {
-        return ec;
-      }
-    }
-
-    return this->get_service().connect(
-        this->get_implementation(), peer_endpoint, ec);
-  }
-
-  /// Start an asynchronous connect.
-  /**
-   * This function is used to asynchronously connect a socket to the specified
-   * remote endpoint. The function call always returns immediately.
-   *
-   * The socket is automatically opened if it is not already open. If the
-   * connect fails, and the socket was automatically opened, the socket is
-   * not returned to the closed state.
-   *
-   * @param peer_endpoint The remote endpoint to which the socket will be
-   * connected. Copies will be made of the endpoint object as required.
-   *
-   * @param handler The handler to be called when the connection operation
-   * completes. Copies will be made of the handler as required. The function
-   * signature of the handler must be:
-   * @code void handler(
-   *   const asio::error_code& error // Result of operation
-   * ); @endcode
-   * Regardless of whether the asynchronous operation completes immediately or
-   * not, the handler will not be invoked from within this function. Invocation
-   * of the handler will be performed in a manner equivalent to using
-   * asio::io_service::post().
-   *
-   * @par Example
-   * @code
-   * void connect_handler(const asio::error_code& error)
-   * {
-   *   if (!error)
-   *   {
-   *     // Connect succeeded.
-   *   }
-   * }
-   *
-   * ...
-   *
-   * asio::ip::tcp::socket socket(io_service);
-   * asio::ip::tcp::endpoint endpoint(
-   *     asio::ip::address::from_string("1.2.3.4"), 12345);
-   * socket.async_connect(endpoint, connect_handler);
-   * @endcode
-   */
-  template <typename ConnectHandler>
-  ASIO_INITFN_RESULT_TYPE(ConnectHandler,
-      void (asio::error_code))
-  async_connect(const endpoint_type& peer_endpoint,
-      ASIO_MOVE_ARG(ConnectHandler) handler)
-  {
-    // If you get an error on the following line it means that your handler does
-    // not meet the documented type requirements for a ConnectHandler.
-    ASIO_CONNECT_HANDLER_CHECK(ConnectHandler, handler) type_check;
-
-    if (!is_open())
-    {
-      asio::error_code ec;
-      const protocol_type protocol = peer_endpoint.protocol();
-      if (this->get_service().open(this->get_implementation(), protocol, ec))
-      {
-        detail::async_result_init<
-          ConnectHandler, void (asio::error_code)> init(
-            ASIO_MOVE_CAST(ConnectHandler)(handler));
-
-        this->get_io_service().post(
-            asio::detail::bind_handler(
-              ASIO_MOVE_CAST(ASIO_HANDLER_TYPE(
-                ConnectHandler, void (asio::error_code)))(
-                  init.handler), ec));
-
-        return init.result.get();
-      }
-    }
-
-    return this->get_service().async_connect(this->get_implementation(),
-        peer_endpoint, ASIO_MOVE_CAST(ConnectHandler)(handler));
-  }
-
-  /// Set an option on the socket.
-  /**
-   * This function is used to set an option on the socket.
-   *
-   * @param option The new option value to be set on the socket.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @sa SettableSocketOption @n
-   * asio::socket_base::broadcast @n
-   * asio::socket_base::do_not_route @n
-   * asio::socket_base::keep_alive @n
-   * asio::socket_base::linger @n
-   * asio::socket_base::receive_buffer_size @n
-   * asio::socket_base::receive_low_watermark @n
-   * asio::socket_base::reuse_address @n
-   * asio::socket_base::send_buffer_size @n
-   * asio::socket_base::send_low_watermark @n
-   * asio::ip::multicast::join_group @n
-   * asio::ip::multicast::leave_group @n
-   * asio::ip::multicast::enable_loopback @n
-   * asio::ip::multicast::outbound_interface @n
-   * asio::ip::multicast::hops @n
-   * asio::ip::tcp::no_delay
-   *
-   * @par Example
-   * Setting the IPPROTO_TCP/TCP_NODELAY option:
-   * @code
-   * asio::ip::tcp::socket socket(io_service);
-   * ...
-   * asio::ip::tcp::no_delay option(true);
-   * socket.set_option(option);
-   * @endcode
-   */
-  template <typename SettableSocketOption>
-  void set_option(const SettableSocketOption& option)
-  {
-    asio::error_code ec;
-    this->get_service().set_option(this->get_implementation(), option, ec);
-    asio::detail::throw_error(ec, "set_option");
-  }
-
-  /// Set an option on the socket.
-  /**
-   * This function is used to set an option on the socket.
-   *
-   * @param option The new option value to be set on the socket.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @sa SettableSocketOption @n
-   * asio::socket_base::broadcast @n
-   * asio::socket_base::do_not_route @n
-   * asio::socket_base::keep_alive @n
-   * asio::socket_base::linger @n
-   * asio::socket_base::receive_buffer_size @n
-   * asio::socket_base::receive_low_watermark @n
-   * asio::socket_base::reuse_address @n
-   * asio::socket_base::send_buffer_size @n
-   * asio::socket_base::send_low_watermark @n
-   * asio::ip::multicast::join_group @n
-   * asio::ip::multicast::leave_group @n
-   * asio::ip::multicast::enable_loopback @n
-   * asio::ip::multicast::outbound_interface @n
-   * asio::ip::multicast::hops @n
-   * asio::ip::tcp::no_delay
-   *
-   * @par Example
-   * Setting the IPPROTO_TCP/TCP_NODELAY option:
-   * @code
-   * asio::ip::tcp::socket socket(io_service);
-   * ...
-   * asio::ip::tcp::no_delay option(true);
-   * asio::error_code ec;
-   * socket.set_option(option, ec);
-   * if (ec)
-   * {
-   *   // An error occurred.
-   * }
-   * @endcode
-   */
-  template <typename SettableSocketOption>
-  asio::error_code set_option(const SettableSocketOption& option,
-      asio::error_code& ec)
-  {
-    return this->get_service().set_option(
-        this->get_implementation(), option, ec);
-  }
-
-  /// Get an option from the socket.
-  /**
-   * This function is used to get the current value of an option on the socket.
-   *
-   * @param option The option value to be obtained from the socket.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @sa GettableSocketOption @n
-   * asio::socket_base::broadcast @n
-   * asio::socket_base::do_not_route @n
-   * asio::socket_base::keep_alive @n
-   * asio::socket_base::linger @n
-   * asio::socket_base::receive_buffer_size @n
-   * asio::socket_base::receive_low_watermark @n
-   * asio::socket_base::reuse_address @n
-   * asio::socket_base::send_buffer_size @n
-   * asio::socket_base::send_low_watermark @n
-   * asio::ip::multicast::join_group @n
-   * asio::ip::multicast::leave_group @n
-   * asio::ip::multicast::enable_loopback @n
-   * asio::ip::multicast::outbound_interface @n
-   * asio::ip::multicast::hops @n
-   * asio::ip::tcp::no_delay
-   *
-   * @par Example
-   * Getting the value of the SOL_SOCKET/SO_KEEPALIVE option:
-   * @code
-   * asio::ip::tcp::socket socket(io_service);
-   * ...
-   * asio::ip::tcp::socket::keep_alive option;
-   * socket.get_option(option);
-   * bool is_set = option.value();
-   * @endcode
-   */
-  template <typename GettableSocketOption>
-  void get_option(GettableSocketOption& option) const
-  {
-    asio::error_code ec;
-    this->get_service().get_option(this->get_implementation(), option, ec);
-    asio::detail::throw_error(ec, "get_option");
-  }
-
-  /// Get an option from the socket.
-  /**
-   * This function is used to get the current value of an option on the socket.
-   *
-   * @param option The option value to be obtained from the socket.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @sa GettableSocketOption @n
-   * asio::socket_base::broadcast @n
-   * asio::socket_base::do_not_route @n
-   * asio::socket_base::keep_alive @n
-   * asio::socket_base::linger @n
-   * asio::socket_base::receive_buffer_size @n
-   * asio::socket_base::receive_low_watermark @n
-   * asio::socket_base::reuse_address @n
-   * asio::socket_base::send_buffer_size @n
-   * asio::socket_base::send_low_watermark @n
-   * asio::ip::multicast::join_group @n
-   * asio::ip::multicast::leave_group @n
-   * asio::ip::multicast::enable_loopback @n
-   * asio::ip::multicast::outbound_interface @n
-   * asio::ip::multicast::hops @n
-   * asio::ip::tcp::no_delay
-   *
-   * @par Example
-   * Getting the value of the SOL_SOCKET/SO_KEEPALIVE option:
-   * @code
-   * asio::ip::tcp::socket socket(io_service);
-   * ...
-   * asio::ip::tcp::socket::keep_alive option;
-   * asio::error_code ec;
-   * socket.get_option(option, ec);
-   * if (ec)
-   * {
-   *   // An error occurred.
-   * }
-   * bool is_set = option.value();
-   * @endcode
-   */
-  template <typename GettableSocketOption>
-  asio::error_code get_option(GettableSocketOption& option,
-      asio::error_code& ec) const
-  {
-    return this->get_service().get_option(
-        this->get_implementation(), option, ec);
-  }
-
-  /// Perform an IO control command on the socket.
-  /**
-   * This function is used to execute an IO control command on the socket.
-   *
-   * @param command The IO control command to be performed on the socket.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @sa IoControlCommand @n
-   * asio::socket_base::bytes_readable @n
-   * asio::socket_base::non_blocking_io
-   *
-   * @par Example
-   * Getting the number of bytes ready to read:
-   * @code
-   * asio::ip::tcp::socket socket(io_service);
-   * ...
-   * asio::ip::tcp::socket::bytes_readable command;
-   * socket.io_control(command);
-   * std::size_t bytes_readable = command.get();
-   * @endcode
-   */
-  template <typename IoControlCommand>
-  void io_control(IoControlCommand& command)
-  {
-    asio::error_code ec;
-    this->get_service().io_control(this->get_implementation(), command, ec);
-    asio::detail::throw_error(ec, "io_control");
-  }
-
-  /// Perform an IO control command on the socket.
-  /**
-   * This function is used to execute an IO control command on the socket.
-   *
-   * @param command The IO control command to be performed on the socket.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @sa IoControlCommand @n
-   * asio::socket_base::bytes_readable @n
-   * asio::socket_base::non_blocking_io
-   *
-   * @par Example
-   * Getting the number of bytes ready to read:
-   * @code
-   * asio::ip::tcp::socket socket(io_service);
-   * ...
-   * asio::ip::tcp::socket::bytes_readable command;
-   * asio::error_code ec;
-   * socket.io_control(command, ec);
-   * if (ec)
-   * {
-   *   // An error occurred.
-   * }
-   * std::size_t bytes_readable = command.get();
-   * @endcode
-   */
-  template <typename IoControlCommand>
-  asio::error_code io_control(IoControlCommand& command,
-      asio::error_code& ec)
-  {
-    return this->get_service().io_control(
-        this->get_implementation(), command, ec);
-  }
-
-  /// Gets the non-blocking mode of the socket.
-  /**
-   * @returns @c true if the socket's synchronous operations will fail with
-   * asio::error::would_block if they are unable to perform the requested
-   * operation immediately. If @c false, synchronous operations will block
-   * until complete.
-   *
-   * @note The non-blocking mode has no effect on the behaviour of asynchronous
-   * operations. Asynchronous operations will never fail with the error
-   * asio::error::would_block.
-   */
-  bool non_blocking() const
-  {
-    return this->get_service().non_blocking(this->get_implementation());
-  }
-
-  /// Sets the non-blocking mode of the socket.
-  /**
-   * @param mode If @c true, the socket's synchronous operations will fail with
-   * asio::error::would_block if they are unable to perform the requested
-   * operation immediately. If @c false, synchronous operations will block
-   * until complete.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @note The non-blocking mode has no effect on the behaviour of asynchronous
-   * operations. Asynchronous operations will never fail with the error
-   * asio::error::would_block.
-   */
-  void non_blocking(bool mode)
-  {
-    asio::error_code ec;
-    this->get_service().non_blocking(this->get_implementation(), mode, ec);
-    asio::detail::throw_error(ec, "non_blocking");
-  }
-
-  /// Sets the non-blocking mode of the socket.
-  /**
-   * @param mode If @c true, the socket's synchronous operations will fail with
-   * asio::error::would_block if they are unable to perform the requested
-   * operation immediately. If @c false, synchronous operations will block
-   * until complete.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @note The non-blocking mode has no effect on the behaviour of asynchronous
-   * operations. Asynchronous operations will never fail with the error
-   * asio::error::would_block.
-   */
-  asio::error_code non_blocking(
-      bool mode, asio::error_code& ec)
-  {
-    return this->get_service().non_blocking(
-        this->get_implementation(), mode, ec);
-  }
-
-  /// Gets the non-blocking mode of the native socket implementation.
-  /**
-   * This function is used to retrieve the non-blocking mode of the underlying
-   * native socket. This mode has no effect on the behaviour of the socket
-   * object's synchronous operations.
-   *
-   * @returns @c true if the underlying socket is in non-blocking mode and
-   * direct system calls may fail with asio::error::would_block (or the
-   * equivalent system error).
-   *
-   * @note The current non-blocking mode is cached by the socket object.
-   * Consequently, the return value may be incorrect if the non-blocking mode
-   * was set directly on the native socket.
-   *
-   * @par Example
-   * This function is intended to allow the encapsulation of arbitrary
-   * non-blocking system calls as asynchronous operations, in a way that is
-   * transparent to the user of the socket object. The following example
-   * illustrates how Linux's @c sendfile system call might be encapsulated:
-   * @code template <typename Handler>
-   * struct sendfile_op
-   * {
-   *   tcp::socket& sock_;
-   *   int fd_;
-   *   Handler handler_;
-   *   off_t offset_;
-   *   std::size_t total_bytes_transferred_;
-   *
-   *   // Function call operator meeting WriteHandler requirements.
-   *   // Used as the handler for the async_write_some operation.
-   *   void operator()(asio::error_code ec, std::size_t)
-   *   {
-   *     // Put the underlying socket into non-blocking mode.
-   *     if (!ec)
-   *       if (!sock_.native_non_blocking())
-   *         sock_.native_non_blocking(true, ec);
-   *
-   *     if (!ec)
-   *     {
-   *       for (;;)
-   *       {
-   *         // Try the system call.
-   *         errno = 0;
-   *         int n = ::sendfile(sock_.native_handle(), fd_, &offset_, 65536);
-   *         ec = asio::error_code(n < 0 ? errno : 0,
-   *             asio::error::get_system_category());
-   *         total_bytes_transferred_ += ec ? 0 : n;
-   *
-   *         // Retry operation immediately if interrupted by signal.
-   *         if (ec == asio::error::interrupted)
-   *           continue;
-   *
-   *         // Check if we need to run the operation again.
-   *         if (ec == asio::error::would_block
-   *             || ec == asio::error::try_again)
-   *         {
-   *           // We have to wait for the socket to become ready again.
-   *           sock_.async_write_some(asio::null_buffers(), *this);
-   *           return;
-   *         }
-   *
-   *         if (ec || n == 0)
-   *         {
-   *           // An error occurred, or we have reached the end of the file.
-   *           // Either way we must exit the loop so we can call the handler.
-   *           break;
-   *         }
-   *
-   *         // Loop around to try calling sendfile again.
-   *       }
-   *     }
-   *
-   *     // Pass result back to user's handler.
-   *     handler_(ec, total_bytes_transferred_);
-   *   }
-   * };
-   *
-   * template <typename Handler>
-   * void async_sendfile(tcp::socket& sock, int fd, Handler h)
-   * {
-   *   sendfile_op<Handler> op = { sock, fd, h, 0, 0 };
-   *   sock.async_write_some(asio::null_buffers(), op);
-   * } @endcode
-   */
-  bool native_non_blocking() const
-  {
-    return this->get_service().native_non_blocking(this->get_implementation());
-  }
-
-  /// Sets the non-blocking mode of the native socket implementation.
-  /**
-   * This function is used to modify the non-blocking mode of the underlying
-   * native socket. It has no effect on the behaviour of the socket object's
-   * synchronous operations.
-   *
-   * @param mode If @c true, the underlying socket is put into non-blocking
-   * mode and direct system calls may fail with asio::error::would_block
-   * (or the equivalent system error).
-   *
-   * @throws asio::system_error Thrown on failure. If the @c mode is
-   * @c false, but the current value of @c non_blocking() is @c true, this
-   * function fails with asio::error::invalid_argument, as the
-   * combination does not make sense.
-   *
-   * @par Example
-   * This function is intended to allow the encapsulation of arbitrary
-   * non-blocking system calls as asynchronous operations, in a way that is
-   * transparent to the user of the socket object. The following example
-   * illustrates how Linux's @c sendfile system call might be encapsulated:
-   * @code template <typename Handler>
-   * struct sendfile_op
-   * {
-   *   tcp::socket& sock_;
-   *   int fd_;
-   *   Handler handler_;
-   *   off_t offset_;
-   *   std::size_t total_bytes_transferred_;
-   *
-   *   // Function call operator meeting WriteHandler requirements.
-   *   // Used as the handler for the async_write_some operation.
-   *   void operator()(asio::error_code ec, std::size_t)
-   *   {
-   *     // Put the underlying socket into non-blocking mode.
-   *     if (!ec)
-   *       if (!sock_.native_non_blocking())
-   *         sock_.native_non_blocking(true, ec);
-   *
-   *     if (!ec)
-   *     {
-   *       for (;;)
-   *       {
-   *         // Try the system call.
-   *         errno = 0;
-   *         int n = ::sendfile(sock_.native_handle(), fd_, &offset_, 65536);
-   *         ec = asio::error_code(n < 0 ? errno : 0,
-   *             asio::error::get_system_category());
-   *         total_bytes_transferred_ += ec ? 0 : n;
-   *
-   *         // Retry operation immediately if interrupted by signal.
-   *         if (ec == asio::error::interrupted)
-   *           continue;
-   *
-   *         // Check if we need to run the operation again.
-   *         if (ec == asio::error::would_block
-   *             || ec == asio::error::try_again)
-   *         {
-   *           // We have to wait for the socket to become ready again.
-   *           sock_.async_write_some(asio::null_buffers(), *this);
-   *           return;
-   *         }
-   *
-   *         if (ec || n == 0)
-   *         {
-   *           // An error occurred, or we have reached the end of the file.
-   *           // Either way we must exit the loop so we can call the handler.
-   *           break;
-   *         }
-   *
-   *         // Loop around to try calling sendfile again.
-   *       }
-   *     }
-   *
-   *     // Pass result back to user's handler.
-   *     handler_(ec, total_bytes_transferred_);
-   *   }
-   * };
-   *
-   * template <typename Handler>
-   * void async_sendfile(tcp::socket& sock, int fd, Handler h)
-   * {
-   *   sendfile_op<Handler> op = { sock, fd, h, 0, 0 };
-   *   sock.async_write_some(asio::null_buffers(), op);
-   * } @endcode
-   */
-  void native_non_blocking(bool mode)
-  {
-    asio::error_code ec;
-    this->get_service().native_non_blocking(
-        this->get_implementation(), mode, ec);
-    asio::detail::throw_error(ec, "native_non_blocking");
-  }
-
-  /// Sets the non-blocking mode of the native socket implementation.
-  /**
-   * This function is used to modify the non-blocking mode of the underlying
-   * native socket. It has no effect on the behaviour of the socket object's
-   * synchronous operations.
-   *
-   * @param mode If @c true, the underlying socket is put into non-blocking
-   * mode and direct system calls may fail with asio::error::would_block
-   * (or the equivalent system error).
-   *
-   * @param ec Set to indicate what error occurred, if any. If the @c mode is
-   * @c false, but the current value of @c non_blocking() is @c true, this
-   * function fails with asio::error::invalid_argument, as the
-   * combination does not make sense.
-   *
-   * @par Example
-   * This function is intended to allow the encapsulation of arbitrary
-   * non-blocking system calls as asynchronous operations, in a way that is
-   * transparent to the user of the socket object. The following example
-   * illustrates how Linux's @c sendfile system call might be encapsulated:
-   * @code template <typename Handler>
-   * struct sendfile_op
-   * {
-   *   tcp::socket& sock_;
-   *   int fd_;
-   *   Handler handler_;
-   *   off_t offset_;
-   *   std::size_t total_bytes_transferred_;
-   *
-   *   // Function call operator meeting WriteHandler requirements.
-   *   // Used as the handler for the async_write_some operation.
-   *   void operator()(asio::error_code ec, std::size_t)
-   *   {
-   *     // Put the underlying socket into non-blocking mode.
-   *     if (!ec)
-   *       if (!sock_.native_non_blocking())
-   *         sock_.native_non_blocking(true, ec);
-   *
-   *     if (!ec)
-   *     {
-   *       for (;;)
-   *       {
-   *         // Try the system call.
-   *         errno = 0;
-   *         int n = ::sendfile(sock_.native_handle(), fd_, &offset_, 65536);
-   *         ec = asio::error_code(n < 0 ? errno : 0,
-   *             asio::error::get_system_category());
-   *         total_bytes_transferred_ += ec ? 0 : n;
-   *
-   *         // Retry operation immediately if interrupted by signal.
-   *         if (ec == asio::error::interrupted)
-   *           continue;
-   *
-   *         // Check if we need to run the operation again.
-   *         if (ec == asio::error::would_block
-   *             || ec == asio::error::try_again)
-   *         {
-   *           // We have to wait for the socket to become ready again.
-   *           sock_.async_write_some(asio::null_buffers(), *this);
-   *           return;
-   *         }
-   *
-   *         if (ec || n == 0)
-   *         {
-   *           // An error occurred, or we have reached the end of the file.
-   *           // Either way we must exit the loop so we can call the handler.
-   *           break;
-   *         }
-   *
-   *         // Loop around to try calling sendfile again.
-   *       }
-   *     }
-   *
-   *     // Pass result back to user's handler.
-   *     handler_(ec, total_bytes_transferred_);
-   *   }
-   * };
-   *
-   * template <typename Handler>
-   * void async_sendfile(tcp::socket& sock, int fd, Handler h)
-   * {
-   *   sendfile_op<Handler> op = { sock, fd, h, 0, 0 };
-   *   sock.async_write_some(asio::null_buffers(), op);
-   * } @endcode
-   */
-  asio::error_code native_non_blocking(
-      bool mode, asio::error_code& ec)
-  {
-    return this->get_service().native_non_blocking(
-        this->get_implementation(), mode, ec);
-  }
-
-  /// Get the local endpoint of the socket.
-  /**
-   * This function is used to obtain the locally bound endpoint of the socket.
-   *
-   * @returns An object that represents the local endpoint of the socket.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @par Example
-   * @code
-   * asio::ip::tcp::socket socket(io_service);
-   * ...
-   * asio::ip::tcp::endpoint endpoint = socket.local_endpoint();
-   * @endcode
-   */
-  endpoint_type local_endpoint() const
-  {
-    asio::error_code ec;
-    endpoint_type ep = this->get_service().local_endpoint(
-        this->get_implementation(), ec);
-    asio::detail::throw_error(ec, "local_endpoint");
-    return ep;
-  }
-
-  /// Get the local endpoint of the socket.
-  /**
-   * This function is used to obtain the locally bound endpoint of the socket.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @returns An object that represents the local endpoint of the socket.
-   * Returns a default-constructed endpoint object if an error occurred.
-   *
-   * @par Example
-   * @code
-   * asio::ip::tcp::socket socket(io_service);
-   * ...
-   * asio::error_code ec;
-   * asio::ip::tcp::endpoint endpoint = socket.local_endpoint(ec);
-   * if (ec)
-   * {
-   *   // An error occurred.
-   * }
-   * @endcode
-   */
-  endpoint_type local_endpoint(asio::error_code& ec) const
-  {
-    return this->get_service().local_endpoint(this->get_implementation(), ec);
-  }
-
-  /// Get the remote endpoint of the socket.
-  /**
-   * This function is used to obtain the remote endpoint of the socket.
-   *
-   * @returns An object that represents the remote endpoint of the socket.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @par Example
-   * @code
-   * asio::ip::tcp::socket socket(io_service);
-   * ...
-   * asio::ip::tcp::endpoint endpoint = socket.remote_endpoint();
-   * @endcode
-   */
-  endpoint_type remote_endpoint() const
-  {
-    asio::error_code ec;
-    endpoint_type ep = this->get_service().remote_endpoint(
-        this->get_implementation(), ec);
-    asio::detail::throw_error(ec, "remote_endpoint");
-    return ep;
-  }
-
-  /// Get the remote endpoint of the socket.
-  /**
-   * This function is used to obtain the remote endpoint of the socket.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @returns An object that represents the remote endpoint of the socket.
-   * Returns a default-constructed endpoint object if an error occurred.
-   *
-   * @par Example
-   * @code
-   * asio::ip::tcp::socket socket(io_service);
-   * ...
-   * asio::error_code ec;
-   * asio::ip::tcp::endpoint endpoint = socket.remote_endpoint(ec);
-   * if (ec)
-   * {
-   *   // An error occurred.
-   * }
-   * @endcode
-   */
-  endpoint_type remote_endpoint(asio::error_code& ec) const
-  {
-    return this->get_service().remote_endpoint(this->get_implementation(), ec);
-  }
-
-  /// Disable sends or receives on the socket.
-  /**
-   * This function is used to disable send operations, receive operations, or
-   * both.
-   *
-   * @param what Determines what types of operation will no longer be allowed.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @par Example
-   * Shutting down the send side of the socket:
-   * @code
-   * asio::ip::tcp::socket socket(io_service);
-   * ...
-   * socket.shutdown(asio::ip::tcp::socket::shutdown_send);
-   * @endcode
-   */
-  void shutdown(shutdown_type what)
-  {
-    asio::error_code ec;
-    this->get_service().shutdown(this->get_implementation(), what, ec);
-    asio::detail::throw_error(ec, "shutdown");
-  }
-
-  /// Disable sends or receives on the socket.
-  /**
-   * This function is used to disable send operations, receive operations, or
-   * both.
-   *
-   * @param what Determines what types of operation will no longer be allowed.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @par Example
-   * Shutting down the send side of the socket:
-   * @code
-   * asio::ip::tcp::socket socket(io_service);
-   * ...
-   * asio::error_code ec;
-   * socket.shutdown(asio::ip::tcp::socket::shutdown_send, ec);
-   * if (ec)
-   * {
-   *   // An error occurred.
-   * }
-   * @endcode
-   */
-  asio::error_code shutdown(shutdown_type what,
-      asio::error_code& ec)
-  {
-    return this->get_service().shutdown(this->get_implementation(), what, ec);
-  }
-
-protected:
-  /// Protected destructor to prevent deletion through this type.
-  ~basic_socket()
-  {
-  }
-};
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_BASIC_SOCKET_HPP
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_socket_acceptor.hpp b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_socket_acceptor.hpp
deleted file mode 100644
index f69f483..0000000
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_socket_acceptor.hpp
+++ /dev/null
@@ -1,1136 +0,0 @@
-//
-// basic_socket_acceptor.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef ASIO_BASIC_SOCKET_ACCEPTOR_HPP
-#define ASIO_BASIC_SOCKET_ACCEPTOR_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/basic_io_object.hpp"
-#include "asio/basic_socket.hpp"
-#include "asio/detail/handler_type_requirements.hpp"
-#include "asio/detail/throw_error.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/error.hpp"
-#include "asio/socket_acceptor_service.hpp"
-#include "asio/socket_base.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-/// Provides the ability to accept new connections.
-/**
- * The basic_socket_acceptor class template is used for accepting new socket
- * connections.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- *
- * @par Example
- * Opening a socket acceptor with the SO_REUSEADDR option enabled:
- * @code
- * asio::ip::tcp::acceptor acceptor(io_service);
- * asio::ip::tcp::endpoint endpoint(asio::ip::tcp::v4(), port);
- * acceptor.open(endpoint.protocol());
- * acceptor.set_option(asio::ip::tcp::acceptor::reuse_address(true));
- * acceptor.bind(endpoint);
- * acceptor.listen();
- * @endcode
- */
-template <typename Protocol,
-    typename SocketAcceptorService = socket_acceptor_service<Protocol> >
-class basic_socket_acceptor
-  : public basic_io_object<SocketAcceptorService>,
-    public socket_base
-{
-public:
-  /// (Deprecated: Use native_handle_type.) The native representation of an
-  /// acceptor.
-  typedef typename SocketAcceptorService::native_handle_type native_type;
-
-  /// The native representation of an acceptor.
-  typedef typename SocketAcceptorService::native_handle_type native_handle_type;
-
-  /// The protocol type.
-  typedef Protocol protocol_type;
-
-  /// The endpoint type.
-  typedef typename Protocol::endpoint endpoint_type;
-
-  /// Construct an acceptor without opening it.
-  /**
-   * This constructor creates an acceptor without opening it to listen for new
-   * connections. The open() function must be called before the acceptor can
-   * accept new socket connections.
-   *
-   * @param io_service The io_service object that the acceptor will use to
-   * dispatch handlers for any asynchronous operations performed on the
-   * acceptor.
-   */
-  explicit basic_socket_acceptor(asio::io_service& io_service)
-    : basic_io_object<SocketAcceptorService>(io_service)
-  {
-  }
-
-  /// Construct an open acceptor.
-  /**
-   * This constructor creates an acceptor and automatically opens it.
-   *
-   * @param io_service The io_service object that the acceptor will use to
-   * dispatch handlers for any asynchronous operations performed on the
-   * acceptor.
-   *
-   * @param protocol An object specifying protocol parameters to be used.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  basic_socket_acceptor(asio::io_service& io_service,
-      const protocol_type& protocol)
-    : basic_io_object<SocketAcceptorService>(io_service)
-  {
-    asio::error_code ec;
-    this->get_service().open(this->get_implementation(), protocol, ec);
-    asio::detail::throw_error(ec, "open");
-  }
-
-  /// Construct an acceptor opened on the given endpoint.
-  /**
-   * This constructor creates an acceptor and automatically opens it to listen
-   * for new connections on the specified endpoint.
-   *
-   * @param io_service The io_service object that the acceptor will use to
-   * dispatch handlers for any asynchronous operations performed on the
-   * acceptor.
-   *
-   * @param endpoint An endpoint on the local machine on which the acceptor
-   * will listen for new connections.
-   *
-   * @param reuse_addr Whether the constructor should set the socket option
-   * socket_base::reuse_address.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @note This constructor is equivalent to the following code:
-   * @code
-   * basic_socket_acceptor<Protocol> acceptor(io_service);
-   * acceptor.open(endpoint.protocol());
-   * if (reuse_addr)
-   *   acceptor.set_option(socket_base::reuse_address(true));
-   * acceptor.bind(endpoint);
-   * acceptor.listen(listen_backlog);
-   * @endcode
-   */
-  basic_socket_acceptor(asio::io_service& io_service,
-      const endpoint_type& endpoint, bool reuse_addr = true)
-    : basic_io_object<SocketAcceptorService>(io_service)
-  {
-    asio::error_code ec;
-    const protocol_type protocol = endpoint.protocol();
-    this->get_service().open(this->get_implementation(), protocol, ec);
-    asio::detail::throw_error(ec, "open");
-    if (reuse_addr)
-    {
-      this->get_service().set_option(this->get_implementation(),
-          socket_base::reuse_address(true), ec);
-      asio::detail::throw_error(ec, "set_option");
-    }
-    this->get_service().bind(this->get_implementation(), endpoint, ec);
-    asio::detail::throw_error(ec, "bind");
-    this->get_service().listen(this->get_implementation(),
-        socket_base::max_connections, ec);
-    asio::detail::throw_error(ec, "listen");
-  }
-
-  /// Construct a basic_socket_acceptor on an existing native acceptor.
-  /**
-   * This constructor creates an acceptor object to hold an existing native
-   * acceptor.
-   *
-   * @param io_service The io_service object that the acceptor will use to
-   * dispatch handlers for any asynchronous operations performed on the
-   * acceptor.
-   *
-   * @param protocol An object specifying protocol parameters to be used.
-   *
-   * @param native_acceptor A native acceptor.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  basic_socket_acceptor(asio::io_service& io_service,
-      const protocol_type& protocol, const native_handle_type& native_acceptor)
-    : basic_io_object<SocketAcceptorService>(io_service)
-  {
-    asio::error_code ec;
-    this->get_service().assign(this->get_implementation(),
-        protocol, native_acceptor, ec);
-    asio::detail::throw_error(ec, "assign");
-  }
-
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-  /// Move-construct a basic_socket_acceptor from another.
-  /**
-   * This constructor moves an acceptor from one object to another.
-   *
-   * @param other The other basic_socket_acceptor object from which the move
-   * will occur.
-   *
-   * @note Following the move, the moved-from object is in the same state as if
-   * constructed using the @c basic_socket_acceptor(io_service&) constructor.
-   */
-  basic_socket_acceptor(basic_socket_acceptor&& other)
-    : basic_io_object<SocketAcceptorService>(
-        ASIO_MOVE_CAST(basic_socket_acceptor)(other))
-  {
-  }
-
-  /// Move-assign a basic_socket_acceptor from another.
-  /**
-   * This assignment operator moves an acceptor from one object to another.
-   *
-   * @param other The other basic_socket_acceptor object from which the move
-   * will occur.
-   *
-   * @note Following the move, the moved-from object is in the same state as if
-   * constructed using the @c basic_socket_acceptor(io_service&) constructor.
-   */
-  basic_socket_acceptor& operator=(basic_socket_acceptor&& other)
-  {
-    basic_io_object<SocketAcceptorService>::operator=(
-        ASIO_MOVE_CAST(basic_socket_acceptor)(other));
-    return *this;
-  }
-
-  // All socket acceptors have access to each other's implementations.
-  template <typename Protocol1, typename SocketAcceptorService1>
-  friend class basic_socket_acceptor;
-
-  /// Move-construct a basic_socket_acceptor from an acceptor of another
-  /// protocol type.
-  /**
-   * This constructor moves an acceptor from one object to another.
-   *
-   * @param other The other basic_socket_acceptor object from which the move
-   * will occur.
-   *
-   * @note Following the move, the moved-from object is in the same state as if
-   * constructed using the @c basic_socket(io_service&) constructor.
-   */
-  template <typename Protocol1, typename SocketAcceptorService1>
-  basic_socket_acceptor(
-      basic_socket_acceptor<Protocol1, SocketAcceptorService1>&& other,
-      typename enable_if<is_convertible<Protocol1, Protocol>::value>::type* = 0)
-    : basic_io_object<SocketAcceptorService>(other.get_io_service())
-  {
-    this->get_service().template converting_move_construct<Protocol1>(
-        this->get_implementation(), other.get_implementation());
-  }
-
-  /// Move-assign a basic_socket_acceptor from an acceptor of another protocol
-  /// type.
-  /**
-   * This assignment operator moves an acceptor from one object to another.
-   *
-   * @param other The other basic_socket_acceptor object from which the move
-   * will occur.
-   *
-   * @note Following the move, the moved-from object is in the same state as if
-   * constructed using the @c basic_socket(io_service&) constructor.
-   */
-  template <typename Protocol1, typename SocketAcceptorService1>
-  typename enable_if<is_convertible<Protocol1, Protocol>::value,
-      basic_socket_acceptor>::type& operator=(
-        basic_socket_acceptor<Protocol1, SocketAcceptorService1>&& other)
-  {
-    basic_socket_acceptor tmp(ASIO_MOVE_CAST2(basic_socket_acceptor<
-            Protocol1, SocketAcceptorService1>)(other));
-    basic_io_object<SocketAcceptorService>::operator=(
-        ASIO_MOVE_CAST(basic_socket_acceptor)(tmp));
-    return *this;
-  }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
-  /// Open the acceptor using the specified protocol.
-  /**
-   * This function opens the socket acceptor so that it will use the specified
-   * protocol.
-   *
-   * @param protocol An object specifying which protocol is to be used.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @par Example
-   * @code
-   * asio::ip::tcp::acceptor acceptor(io_service);
-   * acceptor.open(asio::ip::tcp::v4());
-   * @endcode
-   */
-  void open(const protocol_type& protocol = protocol_type())
-  {
-    asio::error_code ec;
-    this->get_service().open(this->get_implementation(), protocol, ec);
-    asio::detail::throw_error(ec, "open");
-  }
-
-  /// Open the acceptor using the specified protocol.
-  /**
-   * This function opens the socket acceptor so that it will use the specified
-   * protocol.
-   *
-   * @param protocol An object specifying which protocol is to be used.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @par Example
-   * @code
-   * asio::ip::tcp::acceptor acceptor(io_service);
-   * asio::error_code ec;
-   * acceptor.open(asio::ip::tcp::v4(), ec);
-   * if (ec)
-   * {
-   *   // An error occurred.
-   * }
-   * @endcode
-   */
-  asio::error_code open(const protocol_type& protocol,
-      asio::error_code& ec)
-  {
-    return this->get_service().open(this->get_implementation(), protocol, ec);
-  }
-
-  /// Assigns an existing native acceptor to the acceptor.
-  /*
-   * This function opens the acceptor to hold an existing native acceptor.
-   *
-   * @param protocol An object specifying which protocol is to be used.
-   *
-   * @param native_acceptor A native acceptor.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  void assign(const protocol_type& protocol,
-      const native_handle_type& native_acceptor)
-  {
-    asio::error_code ec;
-    this->get_service().assign(this->get_implementation(),
-        protocol, native_acceptor, ec);
-    asio::detail::throw_error(ec, "assign");
-  }
-
-  /// Assigns an existing native acceptor to the acceptor.
-  /*
-   * This function opens the acceptor to hold an existing native acceptor.
-   *
-   * @param protocol An object specifying which protocol is to be used.
-   *
-   * @param native_acceptor A native acceptor.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   */
-  asio::error_code assign(const protocol_type& protocol,
-      const native_handle_type& native_acceptor, asio::error_code& ec)
-  {
-    return this->get_service().assign(this->get_implementation(),
-        protocol, native_acceptor, ec);
-  }
-
-  /// Determine whether the acceptor is open.
-  bool is_open() const
-  {
-    return this->get_service().is_open(this->get_implementation());
-  }
-
-  /// Bind the acceptor to the given local endpoint.
-  /**
-   * This function binds the socket acceptor to the specified endpoint on the
-   * local machine.
-   *
-   * @param endpoint An endpoint on the local machine to which the socket
-   * acceptor will be bound.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @par Example
-   * @code
-   * asio::ip::tcp::acceptor acceptor(io_service);
-   * asio::ip::tcp::endpoint endpoint(asio::ip::tcp::v4(), 12345);
-   * acceptor.open(endpoint.protocol());
-   * acceptor.bind(endpoint);
-   * @endcode
-   */
-  void bind(const endpoint_type& endpoint)
-  {
-    asio::error_code ec;
-    this->get_service().bind(this->get_implementation(), endpoint, ec);
-    asio::detail::throw_error(ec, "bind");
-  }
-
-  /// Bind the acceptor to the given local endpoint.
-  /**
-   * This function binds the socket acceptor to the specified endpoint on the
-   * local machine.
-   *
-   * @param endpoint An endpoint on the local machine to which the socket
-   * acceptor will be bound.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @par Example
-   * @code
-   * asio::ip::tcp::acceptor acceptor(io_service);
-   * asio::ip::tcp::endpoint endpoint(asio::ip::tcp::v4(), 12345);
-   * acceptor.open(endpoint.protocol());
-   * asio::error_code ec;
-   * acceptor.bind(endpoint, ec);
-   * if (ec)
-   * {
-   *   // An error occurred.
-   * }
-   * @endcode
-   */
-  asio::error_code bind(const endpoint_type& endpoint,
-      asio::error_code& ec)
-  {
-    return this->get_service().bind(this->get_implementation(), endpoint, ec);
-  }
-
-  /// Place the acceptor into the state where it will listen for new
-  /// connections.
-  /**
-   * This function puts the socket acceptor into the state where it may accept
-   * new connections.
-   *
-   * @param backlog The maximum length of the queue of pending connections.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  void listen(int backlog = socket_base::max_connections)
-  {
-    asio::error_code ec;
-    this->get_service().listen(this->get_implementation(), backlog, ec);
-    asio::detail::throw_error(ec, "listen");
-  }
-
-  /// Place the acceptor into the state where it will listen for new
-  /// connections.
-  /**
-   * This function puts the socket acceptor into the state where it may accept
-   * new connections.
-   *
-   * @param backlog The maximum length of the queue of pending connections.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @par Example
-   * @code
-   * asio::ip::tcp::acceptor acceptor(io_service);
-   * ...
-   * asio::error_code ec;
-   * acceptor.listen(asio::socket_base::max_connections, ec);
-   * if (ec)
-   * {
-   *   // An error occurred.
-   * }
-   * @endcode
-   */
-  asio::error_code listen(int backlog, asio::error_code& ec)
-  {
-    return this->get_service().listen(this->get_implementation(), backlog, ec);
-  }
-
-  /// Close the acceptor.
-  /**
-   * This function is used to close the acceptor. Any asynchronous accept
-   * operations will be cancelled immediately.
-   *
-   * A subsequent call to open() is required before the acceptor can again be
-   * used to again perform socket accept operations.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  void close()
-  {
-    asio::error_code ec;
-    this->get_service().close(this->get_implementation(), ec);
-    asio::detail::throw_error(ec, "close");
-  }
-
-  /// Close the acceptor.
-  /**
-   * This function is used to close the acceptor. Any asynchronous accept
-   * operations will be cancelled immediately.
-   *
-   * A subsequent call to open() is required before the acceptor can again be
-   * used to again perform socket accept operations.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @par Example
-   * @code
-   * asio::ip::tcp::acceptor acceptor(io_service);
-   * ...
-   * asio::error_code ec;
-   * acceptor.close(ec);
-   * if (ec)
-   * {
-   *   // An error occurred.
-   * }
-   * @endcode
-   */
-  asio::error_code close(asio::error_code& ec)
-  {
-    return this->get_service().close(this->get_implementation(), ec);
-  }
-
-  /// (Deprecated: Use native_handle().) Get the native acceptor representation.
-  /**
-   * This function may be used to obtain the underlying representation of the
-   * acceptor. This is intended to allow access to native acceptor functionality
-   * that is not otherwise provided.
-   */
-  native_type native()
-  {
-    return this->get_service().native_handle(this->get_implementation());
-  }
-
-  /// Get the native acceptor representation.
-  /**
-   * This function may be used to obtain the underlying representation of the
-   * acceptor. This is intended to allow access to native acceptor functionality
-   * that is not otherwise provided.
-   */
-  native_handle_type native_handle()
-  {
-    return this->get_service().native_handle(this->get_implementation());
-  }
-
-  /// Cancel all asynchronous operations associated with the acceptor.
-  /**
-   * This function causes all outstanding asynchronous connect, send and receive
-   * operations to finish immediately, and the handlers for cancelled operations
-   * will be passed the asio::error::operation_aborted error.
-   *
-   * @throws asio::system_error Thrown on failure.
-   */
-  void cancel()
-  {
-    asio::error_code ec;
-    this->get_service().cancel(this->get_implementation(), ec);
-    asio::detail::throw_error(ec, "cancel");
-  }
-
-  /// Cancel all asynchronous operations associated with the acceptor.
-  /**
-   * This function causes all outstanding asynchronous connect, send and receive
-   * operations to finish immediately, and the handlers for cancelled operations
-   * will be passed the asio::error::operation_aborted error.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   */
-  asio::error_code cancel(asio::error_code& ec)
-  {
-    return this->get_service().cancel(this->get_implementation(), ec);
-  }
-
-  /// Set an option on the acceptor.
-  /**
-   * This function is used to set an option on the acceptor.
-   *
-   * @param option The new option value to be set on the acceptor.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @sa SettableSocketOption @n
-   * asio::socket_base::reuse_address
-   * asio::socket_base::enable_connection_aborted
-   *
-   * @par Example
-   * Setting the SOL_SOCKET/SO_REUSEADDR option:
-   * @code
-   * asio::ip::tcp::acceptor acceptor(io_service);
-   * ...
-   * asio::ip::tcp::acceptor::reuse_address option(true);
-   * acceptor.set_option(option);
-   * @endcode
-   */
-  template <typename SettableSocketOption>
-  void set_option(const SettableSocketOption& option)
-  {
-    asio::error_code ec;
-    this->get_service().set_option(this->get_implementation(), option, ec);
-    asio::detail::throw_error(ec, "set_option");
-  }
-
-  /// Set an option on the acceptor.
-  /**
-   * This function is used to set an option on the acceptor.
-   *
-   * @param option The new option value to be set on the acceptor.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @sa SettableSocketOption @n
-   * asio::socket_base::reuse_address
-   * asio::socket_base::enable_connection_aborted
-   *
-   * @par Example
-   * Setting the SOL_SOCKET/SO_REUSEADDR option:
-   * @code
-   * asio::ip::tcp::acceptor acceptor(io_service);
-   * ...
-   * asio::ip::tcp::acceptor::reuse_address option(true);
-   * asio::error_code ec;
-   * acceptor.set_option(option, ec);
-   * if (ec)
-   * {
-   *   // An error occurred.
-   * }
-   * @endcode
-   */
-  template <typename SettableSocketOption>
-  asio::error_code set_option(const SettableSocketOption& option,
-      asio::error_code& ec)
-  {
-    return this->get_service().set_option(
-        this->get_implementation(), option, ec);
-  }
-
-  /// Get an option from the acceptor.
-  /**
-   * This function is used to get the current value of an option on the
-   * acceptor.
-   *
-   * @param option The option value to be obtained from the acceptor.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @sa GettableSocketOption @n
-   * asio::socket_base::reuse_address
-   *
-   * @par Example
-   * Getting the value of the SOL_SOCKET/SO_REUSEADDR option:
-   * @code
-   * asio::ip::tcp::acceptor acceptor(io_service);
-   * ...
-   * asio::ip::tcp::acceptor::reuse_address option;
-   * acceptor.get_option(option);
-   * bool is_set = option.get();
-   * @endcode
-   */
-  template <typename GettableSocketOption>
-  void get_option(GettableSocketOption& option)
-  {
-    asio::error_code ec;
-    this->get_service().get_option(this->get_implementation(), option, ec);
-    asio::detail::throw_error(ec, "get_option");
-  }
-
-  /// Get an option from the acceptor.
-  /**
-   * This function is used to get the current value of an option on the
-   * acceptor.
-   *
-   * @param option The option value to be obtained from the acceptor.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @sa GettableSocketOption @n
-   * asio::socket_base::reuse_address
-   *
-   * @par Example
-   * Getting the value of the SOL_SOCKET/SO_REUSEADDR option:
-   * @code
-   * asio::ip::tcp::acceptor acceptor(io_service);
-   * ...
-   * asio::ip::tcp::acceptor::reuse_address option;
-   * asio::error_code ec;
-   * acceptor.get_option(option, ec);
-   * if (ec)
-   * {
-   *   // An error occurred.
-   * }
-   * bool is_set = option.get();
-   * @endcode
-   */
-  template <typename GettableSocketOption>
-  asio::error_code get_option(GettableSocketOption& option,
-      asio::error_code& ec)
-  {
-    return this->get_service().get_option(
-        this->get_implementation(), option, ec);
-  }
-
-  /// Perform an IO control command on the acceptor.
-  /**
-   * This function is used to execute an IO control command on the acceptor.
-   *
-   * @param command The IO control command to be performed on the acceptor.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @sa IoControlCommand @n
-   * asio::socket_base::non_blocking_io
-   *
-   * @par Example
-   * Getting the number of bytes ready to read:
-   * @code
-   * asio::ip::tcp::acceptor acceptor(io_service);
-   * ...
-   * asio::ip::tcp::acceptor::non_blocking_io command(true);
-   * socket.io_control(command);
-   * @endcode
-   */
-  template <typename IoControlCommand>
-  void io_control(IoControlCommand& command)
-  {
-    asio::error_code ec;
-    this->get_service().io_control(this->get_implementation(), command, ec);
-    asio::detail::throw_error(ec, "io_control");
-  }
-
-  /// Perform an IO control command on the acceptor.
-  /**
-   * This function is used to execute an IO control command on the acceptor.
-   *
-   * @param command The IO control command to be performed on the acceptor.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @sa IoControlCommand @n
-   * asio::socket_base::non_blocking_io
-   *
-   * @par Example
-   * Getting the number of bytes ready to read:
-   * @code
-   * asio::ip::tcp::acceptor acceptor(io_service);
-   * ...
-   * asio::ip::tcp::acceptor::non_blocking_io command(true);
-   * asio::error_code ec;
-   * socket.io_control(command, ec);
-   * if (ec)
-   * {
-   *   // An error occurred.
-   * }
-   * @endcode
-   */
-  template <typename IoControlCommand>
-  asio::error_code io_control(IoControlCommand& command,
-      asio::error_code& ec)
-  {
-    return this->get_service().io_control(
-        this->get_implementation(), command, ec);
-  }
-
-  /// Gets the non-blocking mode of the acceptor.
-  /**
-   * @returns @c true if the acceptor's synchronous operations will fail with
-   * asio::error::would_block if they are unable to perform the requested
-   * operation immediately. If @c false, synchronous operations will block
-   * until complete.
-   *
-   * @note The non-blocking mode has no effect on the behaviour of asynchronous
-   * operations. Asynchronous operations will never fail with the error
-   * asio::error::would_block.
-   */
-  bool non_blocking() const
-  {
-    return this->get_service().non_blocking(this->get_implementation());
-  }
-
-  /// Sets the non-blocking mode of the acceptor.
-  /**
-   * @param mode If @c true, the acceptor's synchronous operations will fail
-   * with asio::error::would_block if they are unable to perform the
-   * requested operation immediately. If @c false, synchronous operations will
-   * block until complete.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @note The non-blocking mode has no effect on the behaviour of asynchronous
-   * operations. Asynchronous operations will never fail with the error
-   * asio::error::would_block.
-   */
-  void non_blocking(bool mode)
-  {
-    asio::error_code ec;
-    this->get_service().non_blocking(this->get_implementation(), mode, ec);
-    asio::detail::throw_error(ec, "non_blocking");
-  }
-
-  /// Sets the non-blocking mode of the acceptor.
-  /**
-   * @param mode If @c true, the acceptor's synchronous operations will fail
-   * with asio::error::would_block if they are unable to perform the
-   * requested operation immediately. If @c false, synchronous operations will
-   * block until complete.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @note The non-blocking mode has no effect on the behaviour of asynchronous
-   * operations. Asynchronous operations will never fail with the error
-   * asio::error::would_block.
-   */
-  asio::error_code non_blocking(
-      bool mode, asio::error_code& ec)
-  {
-    return this->get_service().non_blocking(
-        this->get_implementation(), mode, ec);
-  }
-
-  /// Gets the non-blocking mode of the native acceptor implementation.
-  /**
-   * This function is used to retrieve the non-blocking mode of the underlying
-   * native acceptor. This mode has no effect on the behaviour of the acceptor
-   * object's synchronous operations.
-   *
-   * @returns @c true if the underlying acceptor is in non-blocking mode and
-   * direct system calls may fail with asio::error::would_block (or the
-   * equivalent system error).
-   *
-   * @note The current non-blocking mode is cached by the acceptor object.
-   * Consequently, the return value may be incorrect if the non-blocking mode
-   * was set directly on the native acceptor.
-   */
-  bool native_non_blocking() const
-  {
-    return this->get_service().native_non_blocking(this->get_implementation());
-  }
-
-  /// Sets the non-blocking mode of the native acceptor implementation.
-  /**
-   * This function is used to modify the non-blocking mode of the underlying
-   * native acceptor. It has no effect on the behaviour of the acceptor object's
-   * synchronous operations.
-   *
-   * @param mode If @c true, the underlying acceptor is put into non-blocking
-   * mode and direct system calls may fail with asio::error::would_block
-   * (or the equivalent system error).
-   *
-   * @throws asio::system_error Thrown on failure. If the @c mode is
-   * @c false, but the current value of @c non_blocking() is @c true, this
-   * function fails with asio::error::invalid_argument, as the
-   * combination does not make sense.
-   */
-  void native_non_blocking(bool mode)
-  {
-    asio::error_code ec;
-    this->get_service().native_non_blocking(
-        this->get_implementation(), mode, ec);
-    asio::detail::throw_error(ec, "native_non_blocking");
-  }
-
-  /// Sets the non-blocking mode of the native acceptor implementation.
-  /**
-   * This function is used to modify the non-blocking mode of the underlying
-   * native acceptor. It has no effect on the behaviour of the acceptor object's
-   * synchronous operations.
-   *
-   * @param mode If @c true, the underlying acceptor is put into non-blocking
-   * mode and direct system calls may fail with asio::error::would_block
-   * (or the equivalent system error).
-   *
-   * @param ec Set to indicate what error occurred, if any. If the @c mode is
-   * @c false, but the current value of @c non_blocking() is @c true, this
-   * function fails with asio::error::invalid_argument, as the
-   * combination does not make sense.
-   */
-  asio::error_code native_non_blocking(
-      bool mode, asio::error_code& ec)
-  {
-    return this->get_service().native_non_blocking(
-        this->get_implementation(), mode, ec);
-  }
-
-  /// Get the local endpoint of the acceptor.
-  /**
-   * This function is used to obtain the locally bound endpoint of the acceptor.
-   *
-   * @returns An object that represents the local endpoint of the acceptor.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @par Example
-   * @code
-   * asio::ip::tcp::acceptor acceptor(io_service);
-   * ...
-   * asio::ip::tcp::endpoint endpoint = acceptor.local_endpoint();
-   * @endcode
-   */
-  endpoint_type local_endpoint() const
-  {
-    asio::error_code ec;
-    endpoint_type ep = this->get_service().local_endpoint(
-        this->get_implementation(), ec);
-    asio::detail::throw_error(ec, "local_endpoint");
-    return ep;
-  }
-
-  /// Get the local endpoint of the acceptor.
-  /**
-   * This function is used to obtain the locally bound endpoint of the acceptor.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @returns An object that represents the local endpoint of the acceptor.
-   * Returns a default-constructed endpoint object if an error occurred and the
-   * error handler did not throw an exception.
-   *
-   * @par Example
-   * @code
-   * asio::ip::tcp::acceptor acceptor(io_service);
-   * ...
-   * asio::error_code ec;
-   * asio::ip::tcp::endpoint endpoint = acceptor.local_endpoint(ec);
-   * if (ec)
-   * {
-   *   // An error occurred.
-   * }
-   * @endcode
-   */
-  endpoint_type local_endpoint(asio::error_code& ec) const
-  {
-    return this->get_service().local_endpoint(this->get_implementation(), ec);
-  }
-
-  /// Accept a new connection.
-  /**
-   * This function is used to accept a new connection from a peer into the
-   * given socket. The function call will block until a new connection has been
-   * accepted successfully or an error occurs.
-   *
-   * @param peer The socket into which the new connection will be accepted.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @par Example
-   * @code
-   * asio::ip::tcp::acceptor acceptor(io_service);
-   * ...
-   * asio::ip::tcp::socket socket(io_service);
-   * acceptor.accept(socket);
-   * @endcode
-   */
-  template <typename Protocol1, typename SocketService>
-  void accept(basic_socket<Protocol1, SocketService>& peer,
-      typename enable_if<is_convertible<Protocol, Protocol1>::value>::type* = 0)
-  {
-    asio::error_code ec;
-    this->get_service().accept(this->get_implementation(),
-        peer, static_cast<endpoint_type*>(0), ec);
-    asio::detail::throw_error(ec, "accept");
-  }
-
-  /// Accept a new connection.
-  /**
-   * This function is used to accept a new connection from a peer into the
-   * given socket. The function call will block until a new connection has been
-   * accepted successfully or an error occurs.
-   *
-   * @param peer The socket into which the new connection will be accepted.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @par Example
-   * @code
-   * asio::ip::tcp::acceptor acceptor(io_service);
-   * ...
-   * asio::ip::tcp::soocket socket(io_service);
-   * asio::error_code ec;
-   * acceptor.accept(socket, ec);
-   * if (ec)
-   * {
-   *   // An error occurred.
-   * }
-   * @endcode
-   */
-  template <typename Protocol1, typename SocketService>
-  asio::error_code accept(
-      basic_socket<Protocol1, SocketService>& peer,
-      asio::error_code& ec,
-      typename enable_if<is_convertible<Protocol, Protocol1>::value>::type* = 0)
-  {
-    return this->get_service().accept(this->get_implementation(),
-        peer, static_cast<endpoint_type*>(0), ec);
-  }
-
-  /// Start an asynchronous accept.
-  /**
-   * This function is used to asynchronously accept a new connection into a
-   * socket. The function call always returns immediately.
-   *
-   * @param peer The socket into which the new connection will be accepted.
-   * Ownership of the peer object is retained by the caller, which must
-   * guarantee that it is valid until the handler is called.
-   *
-   * @param handler The handler to be called when the accept operation
-   * completes. Copies will be made of the handler as required. The function
-   * signature of the handler must be:
-   * @code void handler(
-   *   const asio::error_code& error // Result of operation.
-   * ); @endcode
-   * Regardless of whether the asynchronous operation completes immediately or
-   * not, the handler will not be invoked from within this function. Invocation
-   * of the handler will be performed in a manner equivalent to using
-   * asio::io_service::post().
-   *
-   * @par Example
-   * @code
-   * void accept_handler(const asio::error_code& error)
-   * {
-   *   if (!error)
-   *   {
-   *     // Accept succeeded.
-   *   }
-   * }
-   *
-   * ...
-   *
-   * asio::ip::tcp::acceptor acceptor(io_service);
-   * ...
-   * asio::ip::tcp::socket socket(io_service);
-   * acceptor.async_accept(socket, accept_handler);
-   * @endcode
-   */
-  template <typename Protocol1, typename SocketService, typename AcceptHandler>
-  ASIO_INITFN_RESULT_TYPE(AcceptHandler,
-      void (asio::error_code))
-  async_accept(basic_socket<Protocol1, SocketService>& peer,
-      ASIO_MOVE_ARG(AcceptHandler) handler,
-      typename enable_if<is_convertible<Protocol, Protocol1>::value>::type* = 0)
-  {
-    // If you get an error on the following line it means that your handler does
-    // not meet the documented type requirements for a AcceptHandler.
-    ASIO_ACCEPT_HANDLER_CHECK(AcceptHandler, handler) type_check;
-
-    return this->get_service().async_accept(this->get_implementation(),
-        peer, static_cast<endpoint_type*>(0),
-        ASIO_MOVE_CAST(AcceptHandler)(handler));
-  }
-
-  /// Accept a new connection and obtain the endpoint of the peer
-  /**
-   * This function is used to accept a new connection from a peer into the
-   * given socket, and additionally provide the endpoint of the remote peer.
-   * The function call will block until a new connection has been accepted
-   * successfully or an error occurs.
-   *
-   * @param peer The socket into which the new connection will be accepted.
-   *
-   * @param peer_endpoint An endpoint object which will receive the endpoint of
-   * the remote peer.
-   *
-   * @throws asio::system_error Thrown on failure.
-   *
-   * @par Example
-   * @code
-   * asio::ip::tcp::acceptor acceptor(io_service);
-   * ...
-   * asio::ip::tcp::socket socket(io_service);
-   * asio::ip::tcp::endpoint endpoint;
-   * acceptor.accept(socket, endpoint);
-   * @endcode
-   */
-  template <typename SocketService>
-  void accept(basic_socket<protocol_type, SocketService>& peer,
-      endpoint_type& peer_endpoint)
-  {
-    asio::error_code ec;
-    this->get_service().accept(this->get_implementation(),
-        peer, &peer_endpoint, ec);
-    asio::detail::throw_error(ec, "accept");
-  }
-
-  /// Accept a new connection and obtain the endpoint of the peer
-  /**
-   * This function is used to accept a new connection from a peer into the
-   * given socket, and additionally provide the endpoint of the remote peer.
-   * The function call will block until a new connection has been accepted
-   * successfully or an error occurs.
-   *
-   * @param peer The socket into which the new connection will be accepted.
-   *
-   * @param peer_endpoint An endpoint object which will receive the endpoint of
-   * the remote peer.
-   *
-   * @param ec Set to indicate what error occurred, if any.
-   *
-   * @par Example
-   * @code
-   * asio::ip::tcp::acceptor acceptor(io_service);
-   * ...
-   * asio::ip::tcp::socket socket(io_service);
-   * asio::ip::tcp::endpoint endpoint;
-   * asio::error_code ec;
-   * acceptor.accept(socket, endpoint, ec);
-   * if (ec)
-   * {
-   *   // An error occurred.
-   * }
-   * @endcode
-   */
-  template <typename SocketService>
-  asio::error_code accept(
-      basic_socket<protocol_type, SocketService>& peer,
-      endpoint_type& peer_endpoint, asio::error_code& ec)
-  {
-    return this->get_service().accept(
-        this->get_implementation(), peer, &peer_endpoint, ec);
-  }
-
-  /// Start an asynchronous accept.
-  /**
-   * This function is used to asynchronously accept a new connection into a
-   * socket, and additionally obtain the endpoint of the remote peer. The
-   * function call always returns immediately.
-   *
-   * @param peer The socket into which the new connection will be accepted.
-   * Ownership of the peer object is retained by the caller, which must
-   * guarantee that it is valid until the handler is called.
-   *
-   * @param peer_endpoint An endpoint object into which the endpoint of the
-   * remote peer will be written. Ownership of the peer_endpoint object is
-   * retained by the caller, which must guarantee that it is valid until the
-   * handler is called.
-   *
-   * @param handler The handler to be called when the accept operation
-   * completes. Copies will be made of the handler as required. The function
-   * signature of the handler must be:
-   * @code void handler(
-   *   const asio::error_code& error // Result of operation.
-   * ); @endcode
-   * Regardless of whether the asynchronous operation completes immediately or
-   * not, the handler will not be invoked from within this function. Invocation
-   * of the handler will be performed in a manner equivalent to using
-   * asio::io_service::post().
-   */
-  template <typename SocketService, typename AcceptHandler>
-  ASIO_INITFN_RESULT_TYPE(AcceptHandler,
-      void (asio::error_code))
-  async_accept(basic_socket<protocol_type, SocketService>& peer,
-      endpoint_type& peer_endpoint, ASIO_MOVE_ARG(AcceptHandler) handler)
-  {
-    // If you get an error on the following line it means that your handler does
-    // not meet the documented type requirements for a AcceptHandler.
-    ASIO_ACCEPT_HANDLER_CHECK(AcceptHandler, handler) type_check;
-
-    return this->get_service().async_accept(this->get_implementation(), peer,
-        &peer_endpoint, ASIO_MOVE_CAST(AcceptHandler)(handler));
-  }
-};
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_BASIC_SOCKET_ACCEPTOR_HPP
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_socket_iostream.hpp b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_socket_iostream.hpp
deleted file mode 100644
index 8175402..0000000
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/basic_socket_iostream.hpp
+++ /dev/null
@@ -1,286 +0,0 @@
-//
-// basic_socket_iostream.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef ASIO_BASIC_SOCKET_IOSTREAM_HPP
-#define ASIO_BASIC_SOCKET_IOSTREAM_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if !defined(ASIO_NO_IOSTREAM)
-
-#include <istream>
-#include <ostream>
-#include "asio/basic_socket_streambuf.hpp"
-#include "asio/stream_socket_service.hpp"
-
-#if !defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-# include "asio/detail/variadic_templates.hpp"
-
-// A macro that should expand to:
-//   template <typename T1, ..., typename Tn>
-//   explicit basic_socket_iostream(T1 x1, ..., Tn xn)
-//     : std::basic_iostream<char>(
-//         &this->detail::socket_iostream_base<
-//           Protocol, StreamSocketService, Time,
-//           TimeTraits, TimerService>::streambuf_)
-//   {
-//     if (rdbuf()->connect(x1, ..., xn) == 0)
-//       this->setstate(std::ios_base::failbit);
-//   }
-// This macro should only persist within this file.
-
-# define ASIO_PRIVATE_CTR_DEF(n) \
-  template <ASIO_VARIADIC_TPARAMS(n)> \
-  explicit basic_socket_iostream(ASIO_VARIADIC_PARAMS(n)) \
-    : std::basic_iostream<char>( \
-        &this->detail::socket_iostream_base< \
-          Protocol, StreamSocketService, Time, \
-          TimeTraits, TimerService>::streambuf_) \
-  { \
-    this->setf(std::ios_base::unitbuf); \
-    if (rdbuf()->connect(ASIO_VARIADIC_ARGS(n)) == 0) \
-      this->setstate(std::ios_base::failbit); \
-  } \
-  /**/
-
-// A macro that should expand to:
-//   template <typename T1, ..., typename Tn>
-//   void connect(T1 x1, ..., Tn xn)
-//   {
-//     if (rdbuf()->connect(x1, ..., xn) == 0)
-//       this->setstate(std::ios_base::failbit);
-//   }
-// This macro should only persist within this file.
-
-# define ASIO_PRIVATE_CONNECT_DEF(n) \
-  template <ASIO_VARIADIC_TPARAMS(n)> \
-  void connect(ASIO_VARIADIC_PARAMS(n)) \
-  { \
-    if (rdbuf()->connect(ASIO_VARIADIC_ARGS(n)) == 0) \
-      this->setstate(std::ios_base::failbit); \
-  } \
-  /**/
-
-#endif // !defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace detail {
-
-// A separate base class is used to ensure that the streambuf is initialised
-// prior to the basic_socket_iostream's basic_iostream base class.
-template <typename Protocol, typename StreamSocketService,
-    typename Time, typename TimeTraits, typename TimerService>
-class socket_iostream_base
-{
-protected:
-  basic_socket_streambuf<Protocol, StreamSocketService,
-    Time, TimeTraits, TimerService> streambuf_;
-};
-
-}
-
-/// Iostream interface for a socket.
-template <typename Protocol,
-    typename StreamSocketService = stream_socket_service<Protocol>,
-#if defined(ASIO_HAS_BOOST_DATE_TIME) \
-  || defined(GENERATING_DOCUMENTATION)
-    typename Time = boost::posix_time::ptime,
-    typename TimeTraits = asio::time_traits<Time>,
-    typename TimerService = deadline_timer_service<Time, TimeTraits> >
-#else
-    typename Time = steady_timer::clock_type,
-    typename TimeTraits = steady_timer::traits_type,
-    typename TimerService = steady_timer::service_type>
-#endif
-class basic_socket_iostream
-  : private detail::socket_iostream_base<Protocol,
-        StreamSocketService, Time, TimeTraits, TimerService>,
-    public std::basic_iostream<char>
-{
-private:
-  // These typedefs are intended keep this class's implementation independent
-  // of whether it's using Boost.DateTime, Boost.Chrono or std::chrono.
-#if defined(ASIO_HAS_BOOST_DATE_TIME)
-  typedef TimeTraits traits_helper;
-#else
-  typedef detail::chrono_time_traits<Time, TimeTraits> traits_helper;
-#endif
-
-public:
-  /// The endpoint type.
-  typedef typename Protocol::endpoint endpoint_type;
-
-#if defined(GENERATING_DOCUMENTATION)
-  /// The time type.
-  typedef typename TimeTraits::time_type time_type;
-
-  /// The duration type.
-  typedef typename TimeTraits::duration_type duration_type;
-#else
-  typedef typename traits_helper::time_type time_type;
-  typedef typename traits_helper::duration_type duration_type;
-#endif
-
-  /// Construct a basic_socket_iostream without establishing a connection.
-  basic_socket_iostream()
-    : std::basic_iostream<char>(
-        &this->detail::socket_iostream_base<
-          Protocol, StreamSocketService, Time,
-          TimeTraits, TimerService>::streambuf_)
-  {
-    this->setf(std::ios_base::unitbuf);
-  }
-
-#if defined(GENERATING_DOCUMENTATION)
-  /// Establish a connection to an endpoint corresponding to a resolver query.
-  /**
-   * This constructor automatically establishes a connection based on the
-   * supplied resolver query parameters. The arguments are used to construct
-   * a resolver query object.
-   */
-  template <typename T1, ..., typename TN>
-  explicit basic_socket_iostream(T1 t1, ..., TN tn);
-#elif defined(ASIO_HAS_VARIADIC_TEMPLATES)
-  template <typename... T>
-  explicit basic_socket_iostream(T... x)
-    : std::basic_iostream<char>(
-        &this->detail::socket_iostream_base<
-          Protocol, StreamSocketService, Time,
-          TimeTraits, TimerService>::streambuf_)
-  {
-    this->setf(std::ios_base::unitbuf);
-    if (rdbuf()->connect(x...) == 0)
-      this->setstate(std::ios_base::failbit);
-  }
-#else
-  ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_CTR_DEF)
-#endif
-
-#if defined(GENERATING_DOCUMENTATION)
-  /// Establish a connection to an endpoint corresponding to a resolver query.
-  /**
-   * This function automatically establishes a connection based on the supplied
-   * resolver query parameters. The arguments are used to construct a resolver
-   * query object.
-   */
-  template <typename T1, ..., typename TN>
-  void connect(T1 t1, ..., TN tn);
-#elif defined(ASIO_HAS_VARIADIC_TEMPLATES)
-  template <typename... T>
-  void connect(T... x)
-  {
-    if (rdbuf()->connect(x...) == 0)
-      this->setstate(std::ios_base::failbit);
-  }
-#else
-  ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_CONNECT_DEF)
-#endif
-
-  /// Close the connection.
-  void close()
-  {
-    if (rdbuf()->close() == 0)
-      this->setstate(std::ios_base::failbit);
-  }
-
-  /// Return a pointer to the underlying streambuf.
-  basic_socket_streambuf<Protocol, StreamSocketService,
-    Time, TimeTraits, TimerService>* rdbuf() const
-  {
-    return const_cast<basic_socket_streambuf<Protocol, StreamSocketService,
-      Time, TimeTraits, TimerService>*>(
-        &this->detail::socket_iostream_base<
-          Protocol, StreamSocketService, Time,
-          TimeTraits, TimerService>::streambuf_);
-  }
-
-  /// Get the last error associated with the stream.
-  /**
-   * @return An \c error_code corresponding to the last error from the stream.
-   *
-   * @par Example
-   * To print the error associated with a failure to establish a connection:
-   * @code tcp::iostream s("www.boost.org", "http");
-   * if (!s)
-   * {
-   *   std::cout << "Error: " << s.error().message() << std::endl;
-   * } @endcode
-   */
-  const asio::error_code& error() const
-  {
-    return rdbuf()->puberror();
-  }
-
-  /// Get the stream's expiry time as an absolute time.
-  /**
-   * @return An absolute time value representing the stream's expiry time.
-   */
-  time_type expires_at() const
-  {
-    return rdbuf()->expires_at();
-  }
-
-  /// Set the stream's expiry time as an absolute time.
-  /**
-   * This function sets the expiry time associated with the stream. Stream
-   * operations performed after this time (where the operations cannot be
-   * completed using the internal buffers) will fail with the error
-   * asio::error::operation_aborted.
-   *
-   * @param expiry_time The expiry time to be used for the stream.
-   */
-  void expires_at(const time_type& expiry_time)
-  {
-    rdbuf()->expires_at(expiry_time);
-  }
-
-  /// Get the timer's expiry time relative to now.
-  /**
-   * @return A relative time value representing the stream's expiry time.
-   */
-  duration_type expires_from_now() const
-  {
-    return rdbuf()->expires_from_now();
-  }
-
-  /// Set the stream's expiry time relative to now.
-  /**
-   * This function sets the expiry time associated with the stream. Stream
-   * operations performed after this time (where the operations cannot be
-   * completed using the internal buffers) will fail with the error
-   * asio::error::operation_aborted.
-   *
-   * @param expiry_time The expiry time to be used for the timer.
-   */
... 82006 lines suppressed ...


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org