Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrAuthenticationFailed = errors.New("authentication failed")
)
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn is the telnet connection to a teeworlds external console terminal(econ)
func DialTo ¶
DialTo creates a new econ connection that can be used to write or read lines from the teeworlds server via the external console. (The New function is a wrapper around DialTo) address is the <IP>:<PORT(ec_port)> address the password is the one you set via: ec_password You may want to decrease the ec_auth_timeout in order to get disconnected faster and not to block any of the 4 existing econ slots. You can also set your ec_bantime to anything other than 0 in order to ban people that try to connect to you external console and try incorrect credentials ec_output_level [1,2] allows to increase the logging level of your external console. This allows for more verbose econ output parsing
type Option ¶ added in v1.4.0
type Option func(*Conn)
func WithContext ¶ added in v1.4.0
WithContext sets the context for the connection
func WithMaxReconnectDelay ¶ added in v1.4.0
WithMaxReconnectDelay sets the maximum delay between reconnects
func WithOnConnectCommands ¶ added in v1.4.0
WithOnConnectCommands sets the commands to be executed on connect