mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2025-11-06 02:03:43 -08:00
Add constants (enumlike) for stanza types and simplify packet creation (#62)
* Add constants (enumlike) for stanza types * NewIQ, NewMessage and NewPresence are now initialized with the Attrs struct * Update examples * Do not export backoff code. For now, we do not need to expose backoff in the documentation * Make presence priority an int8
This commit is contained in:
@@ -200,7 +200,7 @@ func (c *Client) SendRaw(packet string) error {
|
||||
// Loop: Receive data from server
|
||||
func (c *Client) recv(keepaliveQuit chan<- struct{}) (err error) {
|
||||
for {
|
||||
val, err := next(c.Session.decoder)
|
||||
val, err := nextPacket(c.Session.decoder)
|
||||
if err != nil {
|
||||
close(keepaliveQuit)
|
||||
c.updateState(StateDisconnected)
|
||||
|
||||
Reference in New Issue
Block a user