tcp

package
v10.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 31, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

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 PingServer(address string) (err error)

func Run

func Run(debugLevel, host, port, password string, banner ...string) (err error)

Run starts a tcp listener, run async

func RunWithOptionsAsync added in v10.0.11

func RunWithOptionsAsync(host, port, password string, opts ...serverOptsFunc) error

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 WithRoomCleanupInterval(interval time.Duration) serverOptsFunc

func WithRoomTTL added in v10.0.11

func WithRoomTTL(ttl time.Duration) serverOptsFunc

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL