downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

GearmanWorker::addServers> <GearmanWorker::addOptions
[edit] Last updated: Fri, 23 Mar 2012

view this page in

GearmanWorker::addServer

(PECL gearman >= 0.5.0)

GearmanWorker::addServerAdd a job server

Açıklama

public bool GearmanWorker::addServer ([ string $host = 127.0.0.1 [, int $port = 4730 ]] )

Adds a job server to this worker. This goes into a list of servers than can be used to run jobs. No socket I/O happens here.

Değiştirgeler

host

The job server host name.

port

The job server port.

Dönen Değerler

Başarı durumunda TRUE, başarısızlık durumunda FALSE döner.

Örnekler

Örnek 1 Add alternate Gearman servers

<?php
$worker
= new GearmanWorker(); 
$worker->addServer("10.0.0.1"); 
$worker->addServer("10.0.0.2"7003);
?>

Ayrıca Bakınız



add a note add a note User Contributed Notes GearmanWorker::addServer
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites