diff --git a/xmpp_ping.go b/xmpp_ping.go index 05a3a84..685985d 100644 --- a/xmpp_ping.go +++ b/xmpp_ping.go @@ -4,16 +4,18 @@ import ( "fmt" ) -func (c *Client) PingC2S(jid, server string) { - fmt.Fprintf(c.conn, "\n"+ +func (c *Client) PingC2S(jid, server string) error { + _, err := fmt.Fprintf(c.conn, "\n"+ "\n"+ "", xmlEscape(jid), xmlEscape(server)) + return err } -func (c *Client) PingS2S(fromServer, toServer string) { - fmt.Fprintf(c.conn, "\n"+ +func (c *Client) PingS2S(fromServer, toServer string) error { + _, err := fmt.Fprintf(c.conn, "\n"+ "\n"+ "", xmlEscape(fromServer), xmlEscape(toServer)) + return err }