Documentation ¶
Overview ¶
Package ping implements XEP-0199: XMPP Ping.
Index ¶
Constants ¶
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 ¶ added in v0.15.0
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 ¶ added in v0.15.0
type Handler struct{}
Handler responds to ping requests.
func (Handler) HandleIQ ¶ added in v0.15.0
func (h Handler) HandleIQ(iq stanza.IQ, t xmlstream.TokenReadEncoder, start *xml.StartElement) error
HandleIQ implements mux.IQHandler.
type IQ ¶ added in v0.3.0
IQ is encoded as a ping request.
func (IQ) TokenReader ¶ added in v0.14.0
func (iq IQ) TokenReader() xml.TokenReader
TokenReader satisfies the xmlstream.Marshaler interface.