Exemple #1
0
func (*testFunc) Call(t *eval.Thread) {
	var err error
	c, err = client.ConnectTo("nox73.ru:9000")
	if err != nil {
		fmt.Println("Error: ", err)
	} else {
		fmt.Println("Connected! ")
	}
}
Exemple #2
0
func (b *Bot) Connect() error {
	var err error

	if b.client != nil {
		return nil
	}

	b.client, err = client.ConnectTo(b.addr)
	if err != nil {
		return err
	}

	return nil
}