Home All Groups Group Topic Archive Search About

Equivalent of SIO_UDP_CONNRESET in .NET

Author
5 Jan 2005 10:30 AM
Arnaud Debaene
Hello all.

Is there an equivalent to setting socket option SIO_UDP_CONNRESET to
FALSE (ignore ICMP "port unreachable" messages when sending an UDP
datagram) in .NET socket class?

Thanks.

Arnaud
Author
5 Jan 2005 12:30 PM
Michael Groeger
did not try it, but it should work

const long IOC_IN = 0x80000000;
const long IOC_VENDOR = 0x18000000;
const long SIO_UDP_CONNRESET = IOC_IN | IOC_VENDOR | 12;

byte[] optionInValue = { Convert.ToByte(true) };
byte[] optionOutValue;

Socket.IOControl(SIO_UDP_CONNRESET, optionInValue, optionOutValue);




Show quoteHide quote
"Arnaud Debaene" <adeba***@club-internet.fr> schrieb im Newsbeitrag
news:16a4a8c7.0501050230.30a0d15d@posting.google.com...
> Hello all.
>
> Is there an equivalent to setting socket option SIO_UDP_CONNRESET to
> FALSE (ignore ICMP "port unreachable" messages when sending an UDP
> datagram) in .NET socket class?
>
> Thanks.
>
> Arnaud