title: How to set local endpoint when using boost asio udp socket
body: <p>I have 3 network interfaces on pc and want to make sure that when I do udp socket send, it sends via a specific network interface ( I have the ip address to use when sending data). </p>
  
  <p>Here is the code.</p>
  
  <pre><code>udp::socket send_socket(io_service,boost::asio::ip::udp::v6());
  udp::endpoint local_end_point(boost::asio::ip::address::from_string(LocalIpAddress),1111);
  //  send_socket.bind(local_end_point);
  send_socket.send_to(const_buffer,senderEndpoint,0,error);
  </code></pre>
  
  <p>The above code works but I dont have control over what network interface the data would be sent through. If I uncomment the send_socket.bind line, I stop receiving any data on the other end.</p>
  
  <p>Is there any other way to bind a socket to a particular network interface?</p>