[swift-server-dev] Draft proposal for TLS Service APIs (please review)

Georgios Moschovitis george.moschovitis at icloud.com
Sat Apr 1 01:23:47 CDT 2017


> * These are essentially delegate methods notifying the TLS engine of an event. `onAccept` says that the system has accepted a connection and the TLS engine should do what it needs to do with it, `onSend` means the system is about to send data and it needs the TLS engine to modify it, etc. If so, Swift APIs more often use words like `should`, `will`, or `did` than `on`, particularly since they're more precise about the timing of the delegate method compared to the actual event.

+1 onXXX methods look definitely non-Swifty to me.

One other thing that bothers me is the `Service` postfix  of the main protocol.
`Service` is a common name used in higher-level applications.

Maybe we could replace it with another postfix (e.g. `Engine`) or even drop it completely?

-g.


More information about the swift-server-dev mailing list