Documentation ¶
Index ¶
- Constants
- func ConnectToTCPServer(address, password, room string, timelimit ...time.Duration) (c *comm.Comm, banner string, ipaddr string, err error)
- func PingServer(address string) (err error)
- func Run(debugLevel, host, port, password string, banner ...string) (err error)
- func RunWithOptionsAsync(host, port, password string, opts ...serverOptsFunc) error
- func WithBanner(banner ...string) serverOptsFunc
- func WithLogLevel(level string) serverOptsFunc
- func WithRoomCleanupInterval(interval time.Duration) serverOptsFunc
- func WithRoomTTL(ttl time.Duration) serverOptsFunc
Constants ¶
View Source
const ( DEFAULT_LOG_LEVEL = "debug" DEFAULT_ROOM_CLEANUP_INTERVAL = 10 * time.Minute DEFAULT_ROOM_TTL = 3 * time.Hour )
Variables ¶
This section is empty.
Functions ¶
func ConnectToTCPServer ¶
func ConnectToTCPServer(address, password, room string, timelimit ...time.Duration) (c *comm.Comm, banner string, ipaddr string, err error)
ConnectToTCPServer will initiate a new connection to the specified address, room with optional time limit
func PingServer ¶
func RunWithOptionsAsync ¶ added in v10.0.11
RunWithOptionsAsync asynchronously starts a TCP listener.
func WithBanner ¶ added in v10.0.11
func WithBanner(banner ...string) serverOptsFunc
func WithLogLevel ¶ added in v10.0.11
func WithLogLevel(level string) serverOptsFunc
func WithRoomCleanupInterval ¶ added in v10.0.11
func WithRoomTTL ¶ added in v10.0.11
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.