|
Boost Users : |
Subject: Re: [Boost-users] Is it possible to set DSCP (DiffServ code point) on a network connection?
From: Andreas Wehrmann (a.wehrmann_at_[hidden])
Date: 2011-11-25 03:15:48
On 11/24/2011 08:11 PM, Igor R wrote:
>> I have been reading the documentation and searched this discussion forum but
>> I can not find any information on how to set a DiffServ code point on the
>> network connection. I need to set this to enable QoS on the UDP data I send but I can not find out how to do it.
>
> First of all, it's worth mentioning in the message title what library
> you're talking about. I guess you mean Boost.Asio here.
> AFAIK, asio doesn't provide such an option, but if your platform api
> does - you can get socket's native_handle() and pass it to the
> relevant api.
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
You can do it like this:
boost::asio::detail::socket_option::integer< IPPROTO_IP, IP_TOS >
optionTos( some_tos_value );
udpSendSocket.set_option( optionTos );
-- Dipl.-Ing. (FH) Andreas Wehrmann Software Development -------------------------------------------------------------- Center Communication Systems GmbH A-1210 Wien, Ignaz-Köck-Straße 19 Sitz in Wien FN 796 88p, Firmenbuchgericht Wien www.centersystems.com Tel.: +43 (0) 190 199 - 3616 Mobile: +43 (0) 664 884 75916 Fax: +43 (0) 190 199 - 2110 E-Mail: a.wehrmann_at_[hidden]
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net