SharedWorker.php
private static function connect($socketAddress, WorkerBootstrapProfile $bootstrapProfile, $timeout = null)
    {
        $socket = SocketFactory::createClientSocket($socketAddress, $timeout);
        $connection = Source::fromStream($socket, true, null, false);

        return $bootstrapProfile->getChannelFactory()->createChannel(new BufferedSource($connection), $connection);
    }
private static function connect($socketAddress, WorkerBootstrapProfile $bootstrapProfile, $timeout = null)
    {
        $socket = SocketFactory::createClientSocket($socketAddress, $timeout);
        $connection = Source::fromStream($socket, true, null, false);

        return $bootstrapProfile->getChannelFactory()->createChannel(new BufferedSource($connection), $connection);
    }
@param string                 $socketAddress
@param WorkerBootstrapProfile $bootstrapProfile
@param int|null               $timeout

@throws Exception\ConnectException

@return ChannelInterface