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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top