You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Sorry for the lack of a better title, and even worse the title is eventually wrong.
But the thing I want to accomplish is to interactively play with some functions in the repl. In stead of real data, all results look pretty abstract, maybe because Luv.Loop didn't kicked of all the events?
Here's my naive attempt.
let res = Luv.DNS.getaddrinfo ~family:`INET ~node:"google.com" ();;
Luv.Loop.run ();;
The text was updated successfully, but these errors were encountered:
Luv.DNS.getaddrinfo ~family:`INET ~node:"google.com" () returns a function that's waiting for you to give it a callback. Only once it gets your callback, will it actually start working on the query. The REPL should have told you that the type here is a function.
This example from the docs show how to pass a callback as the last argument to Luv.DNS.getaddrinfo. Once your callback gets called, you have to do some work to extract the actual result, also shown in the example.
There's also an issue about implementing a synchronous DNS API (#30), which would make all of this a bit less complicated.
Hi,
Sorry for the lack of a better title, and even worse the title is eventually wrong.
But the thing I want to accomplish is to interactively play with some functions in the repl. In stead of real data, all results look pretty abstract, maybe because Luv.Loop didn't kicked of all the events?
Here's my naive attempt.
The text was updated successfully, but these errors were encountered: