function doConnect($connector, $loop) { return function () use($connector, $loop) { $connector->create('127.0.0.1', 1337)->then(function (React\Stream\Stream $stream) { $stream->on('data', function ($uuid, React\Stream\Stream $stream) { $uuid = (int) $uuid; echo $uuid, PHP_EOL; $stream->close(); }); }); $loop->futureTick(doConnect($connector, $loop)); }; }
* Time: 14:34 */ require "../Library/constante.lib.php"; require "../Library/Fonctions/Fonctions.php"; initRequire(); initRequirePage("connexion"); initRequireEntityManager(); startSession(); $isConnect = isConnect(); $tabRetour = array(); if ($isConnect) { session_destroy(); header("Location:../"); } if (isPostFormulaire()) { $tabRetour = doConnect(); if ($tabRetour['Retour'] && $tabRetour['Valide'] && $tabRetour['Banni']) { header("Location:../"); } } $configIni = getConfigFile(); ?> <!doctype html> <html lang="fr"> <head> <meta charset="UTF-8"> <title>Connexion</title> <link rel="icon" type="image/png" href="../Images/favicon.png" /> <link rel="stylesheet" type="text/css" href="../vendor/twitter/bootstrap/dist/css/bootstrap.css"> <link rel="stylesheet" type="text/css" href="../Style/general.css">