Incremental progress

This commit is contained in:
Ben 2025-07-27 16:20:52 -07:00
parent 9a7834c330
commit ab3b46713f
Signed by: webmaster
GPG key ID: A5FCBAF34E6E8B50
6 changed files with 99 additions and 22 deletions

View file

@ -20,4 +20,28 @@ var confLocation = flag.String("conf", "./config.txt", "Config file to read from
func GetConfLocation() (location string, set bool) {
if confLocation == nil {return "", false}
return *confLocation, true;
}
/* TCP port to bind to */
var httpPort = flag.Int("port", 11938, "Port number to bind to")
/* @return set boolean will be true if argument is not nil */
func GetHTTPPort() (port int, set bool) {
if httpPort == nil {return -1, false}
return *httpPort, true;
}
/* Listen on a UNIX socket */
var socketLocation = flag.String("socket", "", "Location of UNIX socket to listen on. Setting will disable TCP.")
/* @return set boolean will be true if argument is not nil */
func GetSocketLocation() (port string, set bool) {
if socketLocation == nil {return "", false}
return *socketLocation, true;
}
/* Where the signal-cli binary is */
var binaryLocation = flag.String("binary", "", "Location of the signal-cli binary.")
/* @return set boolean will be true if argument is not nil */
func GetBinaryLocation() (port string, set bool) {
if binaryLocation == nil {return "", false}
return *binaryLocation, true;
}