serverquery

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2021 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 ServerQuery

type ServerQuery struct {
	Host     string
	Port     int
	Username string
	Password string
	// contains filtered or unexported fields
}

ServerQuery wraps around ts3.Client and has some additional methods

func NewServerQuery

func NewServerQuery(host string, port int, username string, password string) (*ServerQuery, error)

NewServerQuery establishes the tcp connection to teamspeak and logs the query in once connected

func (*ServerQuery) Close

func (sq *ServerQuery) Close()

Close the tcp connection

func (*ServerQuery) Connected

func (sq *ServerQuery) Connected() (bool, error)

Connected sends the version command and returns the recieved error, if any

func (*ServerQuery) Do

func (sq *ServerQuery) Do(request libts.Request, value interface{}) error

Do a command and attempt to parse the response in value

func (*ServerQuery) DoRaw

func (sq *ServerQuery) DoRaw(request libts.Request) ([]byte, error)

DoRaw a command and return the raw response

func (*ServerQuery) Notification

func (sq *ServerQuery) Notification() <-chan []byte

Notification returns an io.Reader for arriving events

Jump to

Keyboard shortcuts

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