methodtAbstractDatagramSocket.SetEcnReception
function SetEcnReception(aEnabled: Boolean; out aError: Integer): Boolean; virtual;
Receiving ECN (Explicit Congestion Notification) marks is off until SetEcnReception(True) succeeds; then ReceiveFromEcn reports each datagram's ECN bits in aEcn (deUnknown where the platform cannot). SendToEcn sends like SendTo with the ECN bits set to deNotEct, deEct0 or deEct1 (on Windows the marked ones only after SetEcnReception); deCe and deUnknown are refused. cDatagramUnsupported from SendToEcn means nothing was sent: send the datagram again unmarked with SendTo. A backend that does not override these receives deUnknown and sends only deNotEct. NewDatagramSocket's sockets do both on Windows, Linux, Android, macOS and iOS, where the system allows it.