SUPER-SIMPLE-GAME-LOBBY(6)
π NAME π
okay so this is the SUPER-SIMPLE-GAME-LOBBY(6) manual, and the main character is ssgl_server β the Super Simple Game Lobby server β¨π
β¨ SYNOPSIS β¨
ssgl_server
π DESCRIPTION π
ssgl_server is the server process for a very simple game lobby service. It listens for connections on tcp port 2914 (gamelobby) from game servers and game clients, and it provides a mechanism for game clients to connect to game servers β and nothing more. Periodt. π
It requires a gamelobby entry in /etc/services identifying the "gamelobby" service at tcp and udp port number 2914, like this:
gamelobby 2914/tcp gamelobby 2914/udp
Options: none β that's the whole list, bestie π«Ά
ποΈ FILES ποΈ
/etc/servicesβ to identify thegamelobbyservice port number.
π ENVIRONMENT VARIABLES π
SSGL_PORT
Allows overriding the default port. By default, the gamelobby port will be looked up via getaddrinfo(), and if that fails, it will fall back to using 2914/tcp and 2914/udp. However, if SSGL_PORT is set to a numeric decimal port number, that will be used for tcp and udp port numbers instead. Slay. β¨
SSGL_PRIMARY_IP_PROBE_ADDR
Address used to probe for the host's "primary" IP address. By default, this is 8.8.8.8. Note: No packets are transmitted to this address.
ssgl_server and clients of ssgl_server need to know "the IP address" of the host they run on so they can communicate this to ssgl_lobby. This is more complicated than it might at first seem, because a host may have multiple IP addresses, and the lobby host might be accessible via localhost, but telling the lobby that the IP address is 127.0.0.1 is not useful, so we need a way to get the "primary" IP address. So we do that by constructing a datagram socket connected to 8.8.8.8, Google's DNS server (because it is a datagram socket, no packets are transmitted in forging this "connection"), then using getsockname(2) to figure out the IP address (network interface) that our host would use to transmit, if we did transmit (which we don't). So far so good. π
However, some people want to run on a private network that does not have any connection to the internet, or have a multi-homed host, and want to use an internal network interface rather than an external network. In such a case, connect(2) may fail (e.g. no route to 8.8.8.8), and ssgl_get_primary_host_ip_addr() returns 0.0.0.0, which is duly registered with the lobby, but is useless for actually connecting. Or connect(2) may succeed, but use the "wrong" interface. So to accommodate such scenarios, a probe address other than 8.8.8.8 may be specified for use in determining the primary network interface, e.g. 192.168.1.1. For example:
export SSGL_PRIMARY_IP_PROBE_ADDR=192.168.1.1
π SEE ALSO π
π GOOD LUCK π
You'll need it. ππ
π AUTHOR π
Written by Stephen M. Cameron β iconic behavior, honestly πβ¨
this page is from ssgl_server, dated Nov 2012, and it's the SUPER-SIMPLE-GAME-LOBBY(6) manual β catch you later, bestie π
β¨π¦
π¦ where this page comes from
- nixos 26.05: snis 1.0.9
- nixpkgs unstable: snis 1.1.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms