Auto reply on server ping-request

This commit is contained in:
Vladimir
2016-09-08 20:56:40 +05:00
parent e44d1877bb
commit ccac8addc9
2 changed files with 42 additions and 0 deletions
+6
View File
@@ -25,3 +25,9 @@ func (c *Client) PingS2S(fromServer, toServer string) error {
xmlEscape(fromServer), xmlEscape(toServer))
return err
}
func (c *Client) SendResultPing(id, toServer string) error {
_, err := fmt.Fprintf(c.conn, "<iq type='result' to='%s' id='%s'/>",
xmlEscape(toServer), xmlEscape(id))
return err
}