Skip to content

Commit

Permalink
modify readme
Browse files Browse the repository at this point in the history
  • Loading branch information
xingwenge committed Jul 30, 2019
1 parent 6b987e8 commit 96f30d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ $ composer update
try {
$client = CanalConnectorFactory::createClient(CanalClient::TYPE_SOCKET_CLUE);
# $client = CanalConnectorFactory::createClient(CanalClient::TYPE_SWOOLE);
# $client = CanalConnectorFactory::createClient(CanalClient::TYPE_SOCKET);

$client->connect("127.0.0.1", 11111);
$client->checkValid();
$client->subscribe("1001", "example", ".*\\..*");
# $client->subscribe("1001", "example", "db_name.tb_name"); # 设置过滤

while (true) {
$message = $client->get(100);
$entries = $message->getEntries();
if ($entries) {
if ($entries = $message->getEntries()) {
foreach ($entries as $entry) {
Fmt::println($entry);
}
Expand Down
6 changes: 3 additions & 3 deletions src/sample/client.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
try {
$client = CanalConnectorFactory::createClient(CanalClient::TYPE_SOCKET_CLUE);
# $client = CanalConnectorFactory::createClient(CanalClient::TYPE_SWOOLE);
# $client = CanalConnectorFactory::createClient(CanalClient::TYPE_SOCKET);

$client->connect("127.0.0.1", 11111);
$client->checkValid();
$client->subscribe("1001", "example", ".*\\..*");
# $client->subscribe("1001", "example", "db_name.tb_name"); # 设置过滤

while (true) {
$message = $client->get(100);
$entries = $message->getEntries();
if ($entries) {
if ($entries = $message->getEntries()) {
foreach ($entries as $entry) {
Fmt::println($entry);
}
Expand Down

0 comments on commit 96f30d5

Please sign in to comment.