2
0
mirror of https://github.com/FluuxIO/go-xmpp synced 2024-11-17 15:29:37 +00:00
go-xmpp/cmd/xmpp_component/xmpp_component.go
2018-01-12 19:08:47 +01:00

21 lines
304 B
Go

package main
import (
"fmt"
"fluux.io/xmpp"
)
func main() {
component := xmpp.Component{Host: "mqtt.localhost", Secret: "mypass"}
component.Connect("localhost:8888")
for {
_, packet, err := component.ReadPacket()
if err != nil {
return
}
fmt.Println("Packet received: ", packet)
}
}