SAMP_HUB(1)

πŸ’– samp_hub πŸ’–

okay so bestie, welcome to samp_hub β€” the SAMP Hub Server ✨ this page ships with astropy 1.0.2 and honestly? it's giving "tiny program, many flags". buckle up πŸŽ€


🌸 NAME 🌸

samp_hub β€” the SAMP Hub Server, no cap 🫢


✨ DESCRIPTION ✨

here's the usage, verbatim, don't @ me:

usage: samp_hub [-h] [-k CODE] [-d ADDR] [-p PORT] [-f FILE] [-w]
       [-P SIZE] [-t SECONDS] [-c SECONDS] [-L LEVEL] [-O FILE]
              [-l LABEL] [-m] [-s] [-C FILE] [-K FILE] [--cert-reqs STRING]
              [--ca-certs FILE] [--ssl-version STRING]

πŸŽ€ optional arguments πŸŽ€

the basics, the essentials, the main character flags πŸ’…

  • -h, --help β€” shows this help message and then dips. that's it. that's the whole job.
  • -k CODE, --secret CODE β€” your own custom secret code πŸ”
  • -d ADDR, --addr ADDR β€” the listening address (or IP, same vibe).
  • -p PORT, --port PORT β€” the listening port number.
  • -f FILE, --lockfile FILE β€” a custom lockfile, if you're feeling particular.
  • -w, --no-web-profile β€” runs the Hub with the Web Profile disabled. off. gone. bye πŸ‘‹
  • -P SIZE, --pool-size SIZE β€” how big the socket connections pool is.

⏰ Timeout group ⏰

okay so this one is special options to setup hub and client timeouts. it's literally a lil bundle of options that lets you set up the Hub and clients inactivity timeouts β€” meaning the time interval of Hub-or-client inactivity after which the Hub either shuts down or unregisters the client. and when a client gets forcibly unregistered because its timeout expired? a notification of the samp.hub.disconnect MType gets sent to it. so it's not ghosting, it's a formal goodbye 😭

  • -t SECONDS, --timeout SECONDS β€” sets the Hub inactivity timeout in SECONDS. by default it's 0, which means the Hub never expires. immortal hub energy πŸ‘‘
  • -c SECONDS, --client-timeout SECONDS β€” sets the client inactivity timeout in SECONDS. by default it's 0, so the client never expires either. also immortal. iconic.

πŸ“ Logging options πŸ“

additional options that let you customize the logging output, bestie. by default the SAMP Hub uses the standard output and standard error devices to print out INFO level logging messages. with the options below you can change the logging level and also pick which output files the logging messages get redirected to. very "let me choose my own destiny" of it πŸ’«

  • -L LEVEL, --log-level LEVEL β€” sets the Hub instance log level. your choices are OFF, ERROR, WARNING, INFO, DEBUG.
  • -O FILE, --log-output FILE β€” sets the output file for the log messages.

🧚 Advanced group 🧚

advanced options, addressed to facilitate administrative tasks and to allow new non-standard Hub behaviors. specifically: the --label option is used to assign a value to the hub.label token, and it's used to assign a name to the Hub instance. and then there's the very special --multi option, which lets you start a Hub in multi-instance mode.

multi-instance mode is a non-standard Hub behavior that enables multiple contemporaneous running Hubs. and where do these multi-instance hubs put their non-standard lock-files? inside the <home directory>/.samp-1 directory, naming them using the format:

samp-hub-<PID>-<ID>

where PID is the Hub process ID while ID is an internal ID (an integer). so many hubs. so many little files. so much going on πŸ¦‹

  • -l LABEL, --label LABEL β€” assigns a LABEL to the Hub.
  • -m, --multi β€” runs the Hub in multi-instance mode, generating a custom lockfile with a random name 🎲

πŸ”’ SSL group πŸ”’

additional options to launch the Hub instance using the Secure Sockets Layer (HTTPS). here's the tea: the --key-file and --cert-file parameters specify optional files which contain a certificate used to identify the local side of the connection. often the private key is stored in the same file as the certificate β€” in that case only the --cert-file parameter needs to be passed. if the private key lives in a separate file, then both parameters must be used. and if the private key is stored in the certificate file, it should come before the first certificate in the certificate chain. order matters, bestie, always has πŸ”₯

  • -s, --https β€” runs the Hub using the Secure Sockets Layer.
  • -C FILE, --cert-file FILE β€” sets the certificate file.
  • -K FILE, --key-file FILE β€” sets the key file. by default this option is ignored, assuming that the private key is stored in the certificate file. so like, it's there, it's just on standby πŸ™ˆ
  • --cert-reqs STRING β€” specifies whether a certificate is required from the client side of the connection, and whether it will be validated if provided. it must be one of exactly three values: NONE (certificates ignored, the default), OPTIONAL (not required, but validated if provided), or REQUIRED (required and validated). if this option's value is not NONE, then the --cacerts option must point to a file of CA certificates. so if you're not saying NONE, you have to give it the certs.
  • --ca-certs FILE β€” this file contains a set of concatenated "certification authority" certificates, which are used to validate certificates passed from the client end of the connection.
  • --ssl-version STRING β€” specifies which version of the SSL protocol to use. typically the server chooses a particular protocol version and the client has to adapt to the server's choice. most of the versions are not interoperable with the other versions, so like, pick carefully. if not specified, the default SSL version is taken from the default in the Python standard ssl library for the version of Python that's installed. other SSL protocol versions are: SSLv2, SSLv3, SSLv23, TLSv1, TLSv1_1, TLSv1_2 β€” but not all of them may be available on all versions of Python, so vibe check before you commit πŸ’€

and that's the whole page, no skips, no summaries, we kept every single flag 🫢

this lil manual page is for samp_hub, dated April 2015, and it came to you courtesy of astropy 1.0.2 ✨ go forth and hub responsibly, bestie, ily πŸ’–πŸŒΈπŸŽ€