modulepackage
0.0.0-20210420170015-ec3dd07dfe6a
Repository: https://github.com/cyanbone/tcp_client.git
Documentation: pkg.go.dev
# README
tcp_client
Lib to create tcp clients faster
Usage:
package main
import client "github.com/WesleiRamos/tcp_client"
func main() {
conexao := client.New("127.0.0.1:1232")
conexao.OnOpen(func() {
conexao.WriteString("EAE MAN")
println("Conectou-se")
})
conexao.OnMessage(func(message []byte) {
println("Menssagem: " + string(message))
})
conexao.OnError(func(err error) {
if !conexao.Connected {
panic(err)
} else {
println(err.Error())
}
})
conexao.Listen()
}
# Functions
No description provided by the author
# Structs
No description provided by the author