UdpClient TypeOfService

  • Thread starter Thread starter ShOv
  • Start date Start date
S

ShOv

Hi
Has anybody received the proper TOS in UDP? I get 0!

I go
*__try_cast<__box int*>(this->Client->GetSocketOption
(SocketOptionLevel::IP, SocketOptionName::TypeOfService));

or the equv. in C#.

Thanks
ShOv
 
ShOv said:
Hi
Has anybody received the proper TOS in UDP? I get 0!

I go
*__try_cast<__box int*>(this->Client->GetSocketOption
(SocketOptionLevel::IP, SocketOptionName::TypeOfService));

or the equv. in C#.
ShOv -

It depends on which OS your app is running on. KB article Q248611
states that TOS was not supported on Windows 9x and NT machines (even
though the setsockopt() method returns 0). TOS is supported on 2000
(and XP) machines only after adding a Registry value; defined in the
KB article:

key: HKLM\System\CurrentControlSet\Services\Tcp\Parameters
value: DisableUserTOSSetting (REG_DWORD) = 0

I followed the directions and was able to successfully change the
TOS setting on a socket and send high priority packets. Hope this
helps solve your problem.

Rich Blum - Author
"C# Network Programming" (Sybex)
http://www.sybex.com/sybexbooks.nsf/Booklist/4176
"Network Performance Open Source Toolkit" (Wiley)
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0471433012.html
 
Back
Top