diff --git a/lib/Ratchet/Application/ApplicationInterface.php b/lib/Ratchet/Application/ApplicationInterface.php index 0666995..00da591 100644 --- a/lib/Ratchet/Application/ApplicationInterface.php +++ b/lib/Ratchet/Application/ApplicationInterface.php @@ -5,7 +5,7 @@ use Ratchet\Resource\Connection; interface ApplicationInterface { /** * Decorator pattern - * @param Ratchet\ObserverInterface Application to wrap in protocol + * @param Ratchet\ApplicationInterface Application to wrap in protocol * @throws UnexpectedValueException */ public function __construct(ApplicationInterface $app = null); diff --git a/lib/Ratchet/ObserverInterface.php b/lib/Ratchet/ObserverInterface.php deleted file mode 100644 index ca87e95..0000000 --- a/lib/Ratchet/ObserverInterface.php +++ /dev/null @@ -1,41 +0,0 @@ -getResource(), $address, $port)) { + throw new Exception; + } + + return $address; + } + public function get_option($level, $optname) { if (false === ($res = @socket_get_option($this->getResource(), $level, $optname))) { throw new Exception; diff --git a/lib/Ratchet/SocketInterface.php b/lib/Ratchet/SocketInterface.php index e95e3a1..3f0a1e1 100644 --- a/lib/Ratchet/SocketInterface.php +++ b/lib/Ratchet/SocketInterface.php @@ -54,6 +54,13 @@ interface SocketInterface { */ function connect($address, $port = 0); + /** + * Get the address the socket connected from + * @return string + * @throws Exception + */ + function getRemoteAddress(); + /** * @param int * @param int