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

Definitions for entry handling functions. More...

#include <csignal>
#include <iostream>
#include <thread>
#include "config.h"
#include "confighttp.h"
#include "entry_handler.h"
#include "globals.h"
#include "httpcommon.h"
#include "logging.h"
#include "network.h"
#include "platform/common.h"
#include "version.h"
#include <iphlpapi.h>
Include dependency graph for entry_handler.cpp:

Classes

class  service_ctrl::service_controller
 

Namespaces

namespace  args
 Functions for handling command line arguments.
 
namespace  lifetime
 Functions for handling the lifetime of Sunshine.
 
namespace  service_ctrl
 Namespace for controlling the Sunshine service model on Windows.
 

Functions

int args::creds (const char *name, int argc, char *argv[])
 Reset the user credentials.
 
void lifetime::debug_trap ()
 Breaks into the debugger or terminates Sunshine if no debugger is attached.
 
void lifetime::exit_sunshine (int exit_code, bool async)
 Terminates Sunshine gracefully with the provided exit code.
 
char ** lifetime::get_argv ()
 Get the argv array passed to main().
 
int args::help (const char *name)
 Print help to stdout, then exit.
 
bool is_gamestream_enabled ()
 Check if NVIDIA's GameStream software is running.
 
bool service_ctrl::is_service_running ()
 Check if the service is running.
 
void launch_ui ()
 Launch the Web UI.
 
void launch_ui_with_path (std::string path)
 Launch the Web UI at a specific endpoint.
 
void log_publisher_data ()
 Log the publisher metadata provided from CMake.
 
int args::restore_nvprefs_undo ()
 Restore global NVIDIA control panel settings. If Sunshine was improperly terminated, this function restores the global NVIDIA control panel settings to the undo file left by Sunshine. This function is typically called by the uninstaller.
 
bool service_ctrl::start_service ()
 Start the service and wait for startup to complete.
 
int args::version ()
 Print the version to stdout, then exit.
 
bool service_ctrl::wait_for_ui_ready ()
 Wait for the UI to be ready after Sunshine startup.
 

Variables

char ** lifetime::argv
 
std::atomic_int lifetime::desired_exit_code
 

Detailed Description

Definitions for entry handling functions.

Function Documentation

◆ is_gamestream_enabled()

bool is_gamestream_enabled ( )

Check if NVIDIA's GameStream software is running.

Returns
true if GameStream is enabled, false otherwise.

◆ launch_ui()

void launch_ui ( )

Launch the Web UI.

Examples

void launch_ui()
Launch the Web UI.
Definition entry_handler.cpp:29

◆ launch_ui_with_path()

void launch_ui_with_path ( std::string path)

Launch the Web UI at a specific endpoint.

Examples

void launch_ui_with_path(std::string path)
Launch the Web UI at a specific endpoint.
Definition entry_handler.cpp:34