From: Roland Häder Date: Tue, 7 Jul 2009 19:17:15 +0000 (+0000) Subject: Stub method initListener() added X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=da867a262af141215d2ca2d9d7a27f0a6051ff22;p=hub.git Stub method initListener() added --- diff --git a/application/hub/interfaces/listener/class_Listenable.php b/application/hub/interfaces/listener/class_Listenable.php index 2d5b8c5d7..ede2b555f 100644 --- a/application/hub/interfaces/listener/class_Listenable.php +++ b/application/hub/interfaces/listener/class_Listenable.php @@ -22,6 +22,12 @@ * along with this program. If not, see . */ interface Listenable extends FrameworkInterface { + /** + * Initializes the listener by setting up the required socket server + * + * @return void + */ + function initListener(); } // diff --git a/application/hub/main/listener/class_ b/application/hub/main/listener/class_ index 155249e51..0cb39a6e6 100644 --- a/application/hub/main/listener/class_ +++ b/application/hub/main/listener/class_ @@ -48,6 +48,16 @@ class ???Listener extends BaseListener implements Listenable { // Return the prepared instance return $listenerInstance; } + + /** + * Initializes the listener by setting up the required socket server + * + * @return void + * @todo 0% done + */ + public function initListener() { + $this->partialStub('Need to implement this method.'); + } } // [EOF] diff --git a/application/hub/main/listener/tcp/class_TcpListener.php b/application/hub/main/listener/tcp/class_TcpListener.php index dc6a8a907..ea227ce7f 100644 --- a/application/hub/main/listener/tcp/class_TcpListener.php +++ b/application/hub/main/listener/tcp/class_TcpListener.php @@ -48,6 +48,15 @@ class TcpListener extends BaseListener implements Listenable { // Return the prepared instance return $listenerInstance; } + + /** + * Initializes the listener by setting up the required socket server + * + * @return void + */ + public function initListener() { + $this->partialStub('Need to implement this method.'); + } } // [EOF] diff --git a/application/hub/main/listener/udp/class_UdpListener.php b/application/hub/main/listener/udp/class_UdpListener.php index 4bef4eb06..b3b25b866 100644 --- a/application/hub/main/listener/udp/class_UdpListener.php +++ b/application/hub/main/listener/udp/class_UdpListener.php @@ -48,6 +48,15 @@ class UdpListener extends BaseListener implements Listenable { // Return the prepared instance return $listenerInstance; } + + /** + * Initializes the listener by setting up the required socket server + * + * @return void + */ + public function initListener() { + $this->partialStub('Need to implement this method.'); + } } // [EOF] diff --git a/application/hub/main/nodes/class_BaseHubNode.php b/application/hub/main/nodes/class_BaseHubNode.php index 77c80e084..db16c7742 100644 --- a/application/hub/main/nodes/class_BaseHubNode.php +++ b/application/hub/main/nodes/class_BaseHubNode.php @@ -340,12 +340,18 @@ class BaseHubNode extends BaseHubSystem implements Updateable { $listenerInstance->setListenAddressByConfiguration('node_listen_addr'); $listenerInstance->setListenPortByConfiguration('node_tcp_listen_port'); + // Initialize the listener + $listenerInstance->initListener(); + // Initialize the UDP listener $listenerInstance = ObjectFactory::createObjectByConfiguredName('udp_listener_class', array($this)); // Setup address and port $listenerInstance->setListenAddressByConfiguration('node_listen_addr'); $listenerInstance->setListenPortByConfiguration('node_udp_listen_port'); + + // Initialize the listener + $listenerInstance->initListener(); } }