Commit Graph
6 Commits
Author SHA1 Message Date
Austin ffa6a871f7 Feature: Datagram Packet Info (#1888)
* Break out control message parsing by IP version

* Add shims for Darwin packet info

* Add shims for Linux packet info

* Add channel option for receiving datagram packet info

* Add NIOPacketInfo to AddressedEnvelope.Metadata

* Pipe up packet info channel option to receive path

* Add NIOPacketInfo info and fix backwards compatability

* Document packet info socket options

* Cleanup packet info control message parsing

* Add packet info and ECN combined tests

* Find real interface index during NIOPacketInfo tests

* Add PacketInfo tests to Linux tests
2021-07-08 11:04:53 +01:00
Peter Adams 723ff6acf1 Allow Metadata to be constructed and set on AddressedEnvelope (#1591)
Motivation:

This needs to be possible so users can specify what
ECN status they wish to send.  The auto-generated
initialiser is internal.

Modifications:

Add public initialiser to AddressedEnvelope.Metadata
Add public initialiser to AddressedEnvelope taking Metadata

Result:

Users will be able to construct AddressedEnvelopes with Metadata set.
2020-07-14 15:51:07 +01:00
Peter AdamsandCory Benfield c8e253206b Add Optional ECN MetaData to Addressed Envelope (#1502)
Add Optional ECN MetaData to Addressed Envelope

Motivation:

This is a very small step along the path to #1472

Modifications:

Add an optional metadata field to addressed envelope. Currently the only possible data is ECN information. This is not currently populated anywhere.

Result:

Metadata in place for future work.

Co-authored-by: Cory Benfield <lukasa@apple.com>
2020-05-05 10:30:17 +01:00
JovanMilenkovic 56a72a2a89 Conform NIOAny to CustomStringConvertible (#751)
Motivation:

NIOAny is used extensively across SwiftNIO but can't be reasonably debugged. Users may want to simply call String(describing: CustomStringConvertible) to inspect what is the data they are working with at the moment instead of seeing an output that has no debug value.

Modifications:

Conform NIOAny to CustomStringConvertible, along with other types it currently uses that lacked string representation.

Result:

Users can perform simple debugging by printing their NIOAny object.
2019-03-05 09:23:25 +00:00
Cory Benfield d216f6a7e9 Add public constructor for AddressedEnvelope 2018-02-08 11:21:55 +00:00
Cory Benfield 69a9b378a4 Add AddressedEnvelope type 2018-01-30 16:09:10 +00:00