Closed pokryfka closed 4 years ago
@ktoso
thank you for the references, I have seen it in a few places (in fact its already defined in UDPClient) and will use it for consistency
having said that I think it would be very convenient if SwiftNIO defined it and promoted it in such way
currently different libraries implement (copy and paste) the same type in different namespaces.
In my case I will need to create the type twice (once in public XRayUDPEmitter
and once in internal UDPClient
) and map them (will add inline comment to illustrate it when its implemented)
FYI, you may want to follow this pattern for
EventLoopGroupProvider
, we've been using it consistently in newer sswg libs. https://github.com/swift-server/async-http-client/blob/c9a9bf061d713c91ee9974fa8a6afe413acfd0e9/Sources/AsyncHTTPClient/HTTPClient.swift#L737-L743Example / docs https://github.com/swift-server/async-http-client/blob/9c1c62b183036884332c2cfa2a526b4fa59b9ffe/README.md#request-response-api