mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2025-11-20 16:43:44 -08:00
Transports need to handle open/close stanzas
XMPP and WebSocket transports require different open and close stanzas. To handle this the responsibility handling those and creating the XML decoder is moved to the Transport.
This commit is contained in:
committed by
Mickaël Rémond
parent
25fd476328
commit
92329b48e6
13
stanza/open.go
Normal file
13
stanza/open.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package stanza
|
||||
|
||||
import "encoding/xml"
|
||||
|
||||
// Open Packet
|
||||
// Reference: WebSocket connections must start with this element
|
||||
// https://tools.ietf.org/html/rfc7395#section-3.4
|
||||
type WebsocketOpen struct {
|
||||
XMLName xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-framing open"`
|
||||
From string `xml:"from,attr"`
|
||||
Id string `xml:"id,attr"`
|
||||
Version string `xml:"version,attr"`
|
||||
}
|
||||
Reference in New Issue
Block a user