From 46faad8b57c7c02e2ec158fe7462f751ba63c3be Mon Sep 17 00:00:00 2001 From: Wim Date: Wed, 13 Jul 2016 21:04:28 +0200 Subject: Vendor go-xmpp --- vendor/github.com/mattn/go-xmpp/xmpp_ping.go | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 vendor/github.com/mattn/go-xmpp/xmpp_ping.go (limited to 'vendor/github.com/mattn/go-xmpp/xmpp_ping.go') diff --git a/vendor/github.com/mattn/go-xmpp/xmpp_ping.go b/vendor/github.com/mattn/go-xmpp/xmpp_ping.go new file mode 100644 index 00000000..26d056e9 --- /dev/null +++ b/vendor/github.com/mattn/go-xmpp/xmpp_ping.go @@ -0,0 +1,27 @@ +package xmpp + +import ( + "fmt" +) + +func (c *Client) PingC2S(jid, server string) error { + if jid == "" { + jid = c.jid + } + if server == "" { + server = c.domain + } + _, err := fmt.Fprintf(c.conn, "\n"+ + "\n"+ + "", + xmlEscape(jid), xmlEscape(server)) + return err +} + +func (c *Client) PingS2S(fromServer, toServer string) error { + _, err := fmt.Fprintf(c.conn, "\n"+ + "\n"+ + "", + xmlEscape(fromServer), xmlEscape(toServer)) + return err +} -- cgit v1.2.3