----------------------- WORKERMAN -----------------------------
Workerman version:3.3.5 PHP version:5.5.4
------------------------ WORKERS -------------------------------
user worker listen processes status
root ChannelServer frame://0.0.0.0:2207 1
root websocket websocket://0.0.0.0:4237 3
websocket開(kāi)啟3個(gè)進(jìn)程 每個(gè)進(jìn)程啟動(dòng)時(shí) Channel\Client::connect('127.0.0.1', 2207);
Channel\Client::on('broadcast', function ($event_data) use ($worker) {}
為什么 runAll的時(shí)候 Channel server會(huì)收到6個(gè)請(qǐng)求(是websocket進(jìn)程數(shù)的2倍)
int(1)
string(74) "a:2:{s:4:"type";s:9:"subscribe";s:8:"channels";a:1:{i:0;s:9:"broadcast";}}"
int(1)
string(74) "a:2:{s:4:"type";s:9:"subscribe";s:8:"channels";a:1:{i:0;s:9:"broadcast";}}"
int(2)
string(74) "a:2:{s:4:"type";s:9:"subscribe";s:8:"channels";a:1:{i:0;s:9:"broadcast";}}"
int(2)
string(74) "a:2:{s:4:"type";s:9:"subscribe";s:8:"channels";a:1:{i:0;s:9:"broadcast";}}"
int(3)
string(74) "a:2:{s:4:"type";s:9:"subscribe";s:8:"channels";a:1:{i:0;s:9:"broadcast";}}"
int(3)
string(74) "a:2:{s:4:"type";s:9:"subscribe";s:8:"channels";a:1:{i:0;s:9:"broadcast";}}"