Equivalent of SIO_UDP_CONNRESET in .NET

  • Thread starter Thread starter Arnaud Debaene
  • Start date Start date
A

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
 
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);
 
Back
Top