Multiple binds on a asio socket
Hi, Is it possible to have multiple binds on a single socket instance? Say I have two multicast addresses that share the same port and use the same nic. On linux I would bind like so: listenEndPoint1(multicastAddress1.to_v4(), port); socket_.bind(listenEndPoint1); socket_.set_option(asio::ip::multicast::join_group(multicastAddress1.to_ v4(), interfaceAddress.to_v4())); } Can I then perform a second bind and join for the other multicast address? listenEndPoint2(multicastAddress2.to_v4(), port); socket_.bind(listenEndPoint2); socket_.set_option(asio::ip::multicast::join_group(multicastAddress2.to_ v4(), interfaceAddress.to_v4())); } If this is not possible or good practice, what would be the alternative? Regards, Lee MacDonald Schneider Trading 4th Floor, 25 Copthall Avenue London EC2R 7BP ________________________________ Message from: lee.macdonald@schneidertrading.com Message to: asio-users@lists.sourceforge.net Attached files: 0 This e-mail and any files transmitted with it are confidential, may be legally privileged, and are for the sole use of the intended recipient. Copyright in this e-mail and any accompanying document created by us is owned by us. If you are not the intended recipient of this e-mail or any part of it please telephone our IT Department at the number shown above or by e-mail at info@schneidertrading.com. You should not use or disclose to any other person the contents of this e-mail or its attachments (if any), nor take copies. This e-mail is not a representation or warranty and is not intended nor should it be taken to create any legal relations, contractual or otherwise. Schneider Trading Associates Ltd (Registration No. 3692131) is incorporated in England and Wales and the registered office is at 25 Copthall Avenue, London EC2R 7BP. The company is authorised and regulated by the Financial Services Authority Schneider Trading 4th Floor, 25 Copthall Avenue London EC2R 7BP -------------------------------------------------------- Message from: lee.macdonald@schneidertrading.com Message to: boost-users@lists.boost.org Attached files: 0 This e-mail and any files transmitted with it are confidential, may be legally privileged, and are for the sole use of the intended recipient. Copyright in this e-mail and any accompanying document created by us is owned by us. If you are not the intended recipient of this e-mail or any part of it please telephone our IT Department at the number shown above or by e-mail at info@schneidertrading.com. You should not use or disclose to any other person the contents of this e-mail or its attachments (if any), nor take copies. This e-mail is not a representation or warranty and is not intended nor should it be taken to create any legal relations, contractual or otherwise. Schneider Trading Associates Ltd (Registration No. 3692131) is incorporated in England and Wales and the registered office is at 25 Copthall Avenue, London EC2R 7BP. The company is authorised and regulated by the Financial Services Authority
participants (1)
-
Lee MacDonald