ss="indexterm" name="boost_asio.indexterm.basic_datagram_socket.assign"></a> 
Assign
          an existing native socket to the socket.
        </p>
<pre class="programlisting">void <a class="link" href="assign/overload1.html" title="basic_datagram_socket::assign (1 of 2 overloads)">assign</a>(
    const protocol_type &amp; protocol,
    const native_handle_type &amp; native_socket);
  <span class="emphasis"><em>&#187; <a class="link" href="assign/overload1.html" title="basic_datagram_socket::assign (1 of 2