From b6ccfa7f79e2c351e9797bbd55be0213c5d67192 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20V=C3=A1cha?=
Date: Thu, 7 Mar 2019 10:29:15 +0100
Subject: [PATCH] Add the sendHeartbeat method to the AbstractClient class
---
src/Bunny/AbstractClient.php | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/Bunny/AbstractClient.php b/src/Bunny/AbstractClient.php
index f58eef5..e96353d 100644
--- a/src/Bunny/AbstractClient.php
+++ b/src/Bunny/AbstractClient.php
@@ -489,4 +489,13 @@ protected function findChannelId()
throw new ClientException("No available channels");
}
+ /**
+ * @return void
+ */
+ public function sendHeartbeat()
+ {
+ $this->getWriter()->appendFrame(new HeartbeatFrame(), $this->getWriteBuffer());
+ $this->flushWriteBuffer();
+ }
+
}