Examples: updated PubSubContext.php

This commit is contained in:
Daniele Alessandri
2010-05-22 13:59:16 +02:00
parent f53ffbf42b
commit f60208eb54
+4 -1
View File
@@ -1,8 +1,11 @@
<?php
require_once '../lib/Predis.php';
// Redis 2.0 features new commands that allow clients to subscribe for
// events published on certain channels (PUBSUB).
// Create a client and disable r/w timeout on the socket
$redis = new \Predis\Client('redis://127.0.0.1:6379/?read_write_timeout=-1', 'dev');
$redis = new Predis\Client('redis://127.0.0.1:6379/?read_write_timeout=-1', 'dev');
// Initialize a new pubsub context
$pubsub = $redis->pubSubContext();