File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ names, baby!
1616 $factory = new React\Dns\Resolver\Factory();
1717 $dns = $factory->create('8.8.8.8', $loop);
1818
19- $dns->resolve('igor.io', function ($ip) {
19+ $dns->resolve('igor.io')->then( function ($ip) {
2020 echo "Host: $ip\n";
2121 });
2222
@@ -30,13 +30,13 @@ You can cache results by configuring the resolver to use a `CachedExecutor`:
3030 $factory = new React\Dns\Resolver\Factory();
3131 $dns = $factory->createCached('8.8.8.8', $loop);
3232
33- $dns->resolve('igor.io', function ($ip) {
33+ $dns->resolve('igor.io')->then( function ($ip) {
3434 echo "Host: $ip\n";
3535 });
3636
3737 ...
3838
39- $dns->resolve('igor.io', function ($ip) {
39+ $dns->resolve('igor.io')->then( function ($ip) {
4040 echo "Host: $ip\n";
4141 });
4242
You can’t perform that action at this time.
0 commit comments