Lines Matching refs:req
32 uv_getnameinfo_t* req; in uv__getnameinfo_work() local
36 req = container_of(w, uv_getnameinfo_t, work_req); in uv__getnameinfo_work()
38 if (req->storage.ss_family == AF_INET) in uv__getnameinfo_work()
40 else if (req->storage.ss_family == AF_INET6) in uv__getnameinfo_work()
45 err = getnameinfo((struct sockaddr*) &req->storage, in uv__getnameinfo_work()
47 req->host, in uv__getnameinfo_work()
48 sizeof(req->host), in uv__getnameinfo_work()
49 req->service, in uv__getnameinfo_work()
50 sizeof(req->service), in uv__getnameinfo_work()
51 req->flags); in uv__getnameinfo_work()
52 req->retcode = uv__getaddrinfo_translate_error(err); in uv__getnameinfo_work()
56 uv_getnameinfo_t* req; in uv__getnameinfo_done() local
60 req = container_of(w, uv_getnameinfo_t, work_req); in uv__getnameinfo_done()
61 uv__req_unregister(req->loop); in uv__getnameinfo_done()
65 assert(req->retcode == 0); in uv__getnameinfo_done()
66 req->retcode = UV_EAI_CANCELED; in uv__getnameinfo_done()
67 } else if (req->retcode == 0) { in uv__getnameinfo_done()
68 host = req->host; in uv__getnameinfo_done()
69 service = req->service; in uv__getnameinfo_done()
72 if (req->getnameinfo_cb) in uv__getnameinfo_done()
73 req->getnameinfo_cb(req, req->retcode, host, service); in uv__getnameinfo_done()
82 uv_getnameinfo_t* req, in uv_getnameinfo() argument
86 if (req == NULL || addr == NULL) in uv_getnameinfo()
90 memcpy(&req->storage, in uv_getnameinfo()
94 memcpy(&req->storage, in uv_getnameinfo()
101 uv__req_init(loop, (uv_req_t*)req, UV_GETNAMEINFO); in uv_getnameinfo()
103 req->getnameinfo_cb = getnameinfo_cb; in uv_getnameinfo()
104 req->flags = flags; in uv_getnameinfo()
105 req->type = UV_GETNAMEINFO; in uv_getnameinfo()
106 req->loop = loop; in uv_getnameinfo()
107 req->retcode = 0; in uv_getnameinfo()
111 &req->work_req, in uv_getnameinfo()
117 uv__getnameinfo_work(&req->work_req); in uv_getnameinfo()
118 uv__getnameinfo_done(&req->work_req, 0); in uv_getnameinfo()
119 return req->retcode; in uv_getnameinfo()