Sunshine latest
Self-hosted game stream host for Moonlight.
publish.cpp File Reference

Definitions for publishing services on macOS. More...

#include <thread>
#include <dns_sd.h>
#include "src/logging.h"
#include "src/network.h"
#include "src/nvhttp.h"
#include "src/platform/common.h"
Include dependency graph for publish.cpp:

Functions

std::unique_ptr< deinit_tplatf::publish::start ()
 Main entry point for publication of our service on macOS.
 

Detailed Description

Definitions for publishing services on macOS.

Function Documentation

◆ start()

std::unique_ptr<::platf::deinit_t > platf::publish::start ( )

Main entry point for publication of our service on macOS.

This function initiates a connection to the macOS mDNS service and requests to register our Sunshine service. Registration will occur asynchronously (unless it fails immediately, which is probably only possible if the host machine is misconfigured).

Returns
Either nullptr (if the registration fails immediately) or a uniqur_ptr<deinit_t>, which will manage polling for a response from the mDNS service, and then, when deconstructed, will deregister the service.