Skip to content

Commit 6396f97

Browse files
committed
Rename $resolver to $dns in examples
This is partially to prevent clashes in the future with React/Promise, which includes a separate concept of resolvers. It also is more intuitive to newcomers, and reads nicer in general.
1 parent 91c0d6d commit 6396f97

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ names, baby!
1414

1515
$loop = React\EventLoop\Factory::create();
1616
$factory = new React\Dns\Resolver\Factory();
17-
$resolver = $factory->create('8.8.8.8', $loop);
17+
$dns = $factory->create('8.8.8.8', $loop);
1818

19-
$resolver->resolve('igor.io', function ($ip) {
19+
$dns->resolve('igor.io', function ($ip) {
2020
echo "Host: $ip\n";
2121
});
2222

@@ -28,15 +28,15 @@ You can cache results by configuring the resolver to use a `CachedExecutor`:
2828

2929
$loop = React\EventLoop\Factory::create();
3030
$factory = new React\Dns\Resolver\Factory();
31-
$resolver = $factory->createCached('8.8.8.8', $loop);
31+
$dns = $factory->createCached('8.8.8.8', $loop);
3232

33-
$resolver->resolve('igor.io', function ($ip) {
33+
$dns->resolve('igor.io', function ($ip) {
3434
echo "Host: $ip\n";
3535
});
3636

3737
...
3838

39-
$resolver->resolve('igor.io', function ($ip) {
39+
$dns->resolve('igor.io', function ($ip) {
4040
echo "Host: $ip\n";
4141
});
4242

0 commit comments

Comments
 (0)