diff --git a/xmpp_ping.go b/xmpp_ping.go
new file mode 100644
index 0000000..88b07cc
--- /dev/null
+++ b/xmpp_ping.go
@@ -0,0 +1,19 @@
+package xmpp
+
+import (
+ "fmt"
+)
+
+func (c* Client) PingC2S(jid, server string) {
+ fmt.Fprintf(c.conn, "\n" +
+ "\n" +
+ "",
+ xmlEscape(jid), xmlEscape(server))
+}
+
+func (c* Client) PingS2S(fromServer, toServer string) {
+ fmt.Fprintf(c.conn, "\n" +
+ "\n" +
+ "",
+ xmlEscape(fromServer), xmlEscape(toServer))
+}