Clue\React\Buzz\Io\Sender::createFromLoop PHP Méthode

createFromLoop() public static méthode

create a new default sender attached to the given event loop
public static createFromLoop ( React\EventLoop\LoopInterface $loop ) : self
$loop React\EventLoop\LoopInterface
Résultat self
    public static function createFromLoop(LoopInterface $loop)
    {
        return self::createFromLoopDns($loop, '8.8.8.8');
    }

Usage Example

Exemple #1
0
 public function __construct(LoopInterface $loop, Sender $sender = null, MessageFactory $messageFactory = null)
 {
     if ($sender === null) {
         $sender = Sender::createFromLoop($loop);
     }
     if ($messageFactory === null) {
         $messageFactory = new MessageFactory();
     }
     $this->sender = $sender;
     $this->loop = $loop;
     $this->messageFactory = $messageFactory;
 }
All Usage Examples Of Clue\React\Buzz\Io\Sender::createFromLoop