From d9283d9593ba40f7ee4acee96da03919c6a13436 Mon Sep 17 00:00:00 2001 From: Chris Boden Date: Thu, 10 Nov 2011 22:45:18 -0500 Subject: [PATCH] Updated Docs --- lib/Ratchet/Socket.php | 3 +++ lib/Ratchet/SocketObserver.php | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/lib/Ratchet/Socket.php b/lib/Ratchet/Socket.php index 6a7beb2..655f715 100644 --- a/lib/Ratchet/Socket.php +++ b/lib/Ratchet/Socket.php @@ -82,6 +82,9 @@ class Socket implements SocketInterface { return $num; } + /** + * @todo Do loop to make sure entire buffer is sent to client + */ public function write($buffer, $length = 0) { return $this->__call('write', array($buffer, $length)); } diff --git a/lib/Ratchet/SocketObserver.php b/lib/Ratchet/SocketObserver.php index 0c8ed0e..a316c44 100644 --- a/lib/Ratchet/SocketObserver.php +++ b/lib/Ratchet/SocketObserver.php @@ -30,5 +30,12 @@ interface SocketObserver { */ function onClose(SocketInterface $conn); + /** + * If there is an error with one of the sockets, or somewhere in the application where an Exception is thrown, + * the Exception is sent back down the stack, handled by the Server and bubbled back up the application through this method + * @param SocketInterface + * @param \Exception + * @return Ratchet\Command\CommandInterface|null + */ function onError(SocketInterface $conn, \Exception $e); } \ No newline at end of file