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