// Get a socket registry instance (singleton)
$registryInstance = SocketRegistryFactory::createSocketRegistryInstance();
+ // Get a connection info instance
+ $infoInstance = ConnectionInfoFactory::createConnectionInfoInstance();
+
+ // Will the info instance with listener data
+ $infoInstance->fillWithListenerInformation($this);
+
// Register the socket
- $registryInstance->registerSocket($this, $socketResource);
+ $registryInstance->registerSocket($infoInstance, $socketResource);
// And set it here
$this->setSocketResource($socketResource);
// Get a socket registry instance (singleton)
$registryInstance = SocketRegistryFactory::createSocketRegistryInstance();
+ // Get a connection info instance
+ $infoInstance = ConnectionInfoFactory::createConnectionInfoInstance();
+
+ // Will the info instance with listener data
+ $infoInstance->fillWithListenerInformation($this);
+
// Check it
- $isRegistered = $registryInstance->isSocketRegistered($this, $socketResource);
+ $isRegistered = $registryInstance->isSocketRegistered($infoInstance, $socketResource);
// Return result
return $isRegistered;