Skip to content

Instantly share code, notes, and snippets.

@mpapec
Created September 8, 2016 06:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mpapec/e07793c9878d9e46452688a52f51a3fb to your computer and use it in GitHub Desktop.
Save mpapec/e07793c9878d9e46452688a52f51a3fb to your computer and use it in GitHub Desktop.
$redis
->subscribe([q{_mojoRespondRoom}], $d->begin)
->publish(q{_mojoRoom}, encode_json({}), $d->begin)
=========
redis-cli
127.0.0.1:6379> MONITOR
1473313898.869797 [3 127.0.0.1:34438] "PUBLISH" "_mojoRoom" "{\"request\":\"activeClients\"}"
1473313898.869895 [3 127.0.0.1:34436] "SUBSCRIBE" "_mojoRespondRoom"
1473313979.590725 [3 127.0.0.1:34438] "PUBLISH" "_mojoRoom" "{\"request\":\"activeClients\"}"
1473313979.590861 [3 127.0.0.1:34436] "SUBSCRIBE" "_mojoRespondRoom"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment