Skip to content

TimeOut Connect Google Hangout #2

@jrpikong

Description

@jrpikong

Hi @Norgul , I use your library and I try to connect with Google Hangout with this config

use Norgul\Xmpp\Options;
use Norgul\Xmpp\XmppClient;

class XmppController extends Controller
{
    protected static $host     = 'gmail.com';
    protected static $port     = 5222;
    protected static $username = 'user_gmail'; // user_gmail@gmail.com
    protected static $password = 'password_gmail';
    public function __construct()
    {
        ini_set('display_errors', 1);
        ini_set('display_startup_errors', 1);
        error_reporting(E_ALL);
    }
    public function getMessage()
    {
        $options = new Options();
        $options
            ->setHost(self::$host)
            ->setPort(self::$port)
            ->setUsername(self::$username)
            ->setPassword(self::$password);
        $client = new XmppClient($options);
        $client->connect();
        $client->getRoster();
        $client->sendMessage('Hello world', 'test@jabber.com');
        $client->getResponse();
        do {
            $client->getResponse();
        } while (true);
    }
}

but always request time out.
can you help me ?

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions