Documentation
Overview ¶
Package ping implements XEP-0199: XMPP Ping.
Index ¶
Constants ¶
View Source
const NS = `urn:xmpp:ping`
NS is the XML namespace used by XMPP pings. It is provided as a convenience.
Variables ¶
This section is empty.
Functions ¶
func Send ¶
Send sends a ping to the provided JID and blocks until a response is received. Pings sent to other clients should use the full JID, otherwise they will be handled by the server.
If the remote JID reports that the ping service is unavailable, no error is returned because we were able to receive the error response (the remote resource exists and could be pinged, it just doesn't support this particular protocol for doing so).
Types ¶
type Handler ¶
type Handler struct{}
Handler responds to ping requests.
func (Handler) HandleIQ ¶
func (h Handler) HandleIQ(iq stanza.IQ, t xmlstream.TokenReadEncoder, start *xml.StartElement) error
HandleIQ implements mux.IQHandler.
type IQ ¶
IQ is encoded as a ping request.
func (IQ) TokenReader ¶
func (iq IQ) TokenReader() xml.TokenReader
TokenReader satisfies the xmlstream.Marshaler interface.