From aa51ea53f9374a79d6fe1db62ff3a3974bb7a7a9 Mon Sep 17 00:00:00 2001 From: Chris Boden Date: Wed, 25 Apr 2012 22:15:06 -0400 Subject: [PATCH] IO adds remoteAddress to Connection --- src/Ratchet/Component/Server/IOServerComponent.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Ratchet/Component/Server/IOServerComponent.php b/src/Ratchet/Component/Server/IOServerComponent.php index f328647..e207540 100644 --- a/src/Ratchet/Component/Server/IOServerComponent.php +++ b/src/Ratchet/Component/Server/IOServerComponent.php @@ -161,6 +161,8 @@ class IOServerComponent implements MessageComponentInterface { $new_socket->set_nonblock(); $new_connection = new Connection($new_socket); + $new_connection->remoteAddress = $new_socket->getRemoteAddress(); + $this->_resources[] = $new_connection->getSocket()->getResource(); $this->_connections[$new_connection->getSocket()->getResource()] = $new_connection;