package
0.0.0-20230706201950-72cce0b70d64
Repository: https://github.com/craumix/onionmsg.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

CreateMemFD creates an anonymous file and then returns the path for the created file.
CreateTCPSocket creates a socket listening on the loopback interface with the specified port.
CreateUnixSocket tries to create a unix socket with the specified name.Tries to use the path from env XDG_RUNTIME_DIR.If XDG_RUNTIME_DIR is not set, the socket is created in /tmp.
LoadCompressedData loads the file specified by the path, zstd decompresses it and the tries to unmarshal it into the provided struct.
SaveDataCompressed marshals the provided struct, zstd compresses it and the writes it to the file specified by the provided path.
StartLocalServer is a wrapper for StartServer which uses "localhost" as the hostname.This makes the server only available for local connections.
StartServer opens a listener on the specified interface and port and passes connectionsto the provided handler, which is the startet as a new goroutine.The hostname can be omitted to listen on all interfaces.