Can you explain further about
$urlget() is a threaded call. If you initiate a $urlget() and there is an immediate error, it will return 0.
In the above example, $urlget() succeeds because it was initiated succesfully.
However, it can still fail during the connection process, which involves blocking calls, for any number of reasons. That is why there is a .state property that allows you to check if the connection failed.