Bind only to localhost in Cohttp_lwt_unix?

Yes, creating a custom conduit is the way to do this right now as @hcarty shows above. It’s on my list to simplify in Cohttp as soon as we get Cohttp 1.0 out of the door.

The reason for using Conduit like this is that it’s a point of abstraction for launch services – so another backend (e.g. the Conduit launchd one) can be used to trigger Cohttp requests from macOS launchd. However, the common case of just binding to a Unix port is too complex with this low-level API at present.

1 Like