Improve the in-process Tor API: create owning control port
It would be good to have an interface something like this for controller authors to use, if they're embedding Tor:
#ifdef _WIN32
#define CONTROL_SOCKET SOCKET
#else
#define CONTROL_SOCKET int
#endif
/**
* Tells Tor to create a socket for an owning controller connection to the
* Tor that will be launched. Return the socket.
*/
CONTROL_SOCKET tor_main_configuration_setup_control_socket(
tor_main_configuration_t *cfg);
#idef _WIN32
/** Windows-only; experimental. Tells Tor to create an anonymous pipe
* (whatever that's called) as an owning connection for the he controller, and
* and return that pipe. */
HANDLE tor_main_configuration_setup_control_pipe(
tor_main_configuration_t *cfg);
#endif
We should make sure it's portable, and that it can be implemented both with libtor_runner and with in-process Tor.