config

package
v1.14.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientConfig

type ClientConfig struct {
	// Network define the network protocol
	Network libptc.NetworkProtocol ``
	// Address define the address to connect
	Address string
}

ClientConfig define the client configuration

func (ClientConfig) New

func (o ClientConfig) New() (libsck.Client, error)

New returns a new Client based on the configuration. It takes a ClientConfig as a parameter and returns a libsck.Client and an error.

type ServerConfig

type ServerConfig struct {
	// network protocol
	Network libptc.NetworkProtocol ``
	// address to listen
	Address string
	// permission of owner for socket file
	PermFile os.FileMode
	// permission of group for socket file
	GroupPerm int32
}

ServerConfig define the server configuration

func (ServerConfig) New

func (o ServerConfig) New(handler libsck.Handler) (libsck.Server, error)

New returns a new server with the given handler and based on the ServerConfig handler libsck.Handler (libsck.Server, error)

Jump to

Keyboard shortcuts

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