Lines Matching refs:req
42 uv_getnameinfo_t* req; in uv__getnameinfo_work() local
48 req = container_of(w, uv_getnameinfo_t, work_req); in uv__getnameinfo_work()
49 if (GetNameInfoW((struct sockaddr*)&req->storage, in uv__getnameinfo_work()
50 sizeof(req->storage), in uv__getnameinfo_work()
55 req->flags)) { in uv__getnameinfo_work()
57 req->retcode = uv__getaddrinfo_translate_error(ret); in uv__getnameinfo_work()
61 size = sizeof(req->host); in uv__getnameinfo_work()
62 ret = uv__copy_utf16_to_utf8(host, -1, req->host, &size); in uv__getnameinfo_work()
64 req->retcode = ret; in uv__getnameinfo_work()
68 size = sizeof(req->service); in uv__getnameinfo_work()
69 ret = uv__copy_utf16_to_utf8(service, -1, req->service, &size); in uv__getnameinfo_work()
71 req->retcode = ret; in uv__getnameinfo_work()
80 uv_getnameinfo_t* req; in uv__getnameinfo_done() local
84 req = container_of(w, uv_getnameinfo_t, work_req); in uv__getnameinfo_done()
85 uv__req_unregister(req->loop); in uv__getnameinfo_done()
89 assert(req->retcode == 0); in uv__getnameinfo_done()
90 req->retcode = UV_EAI_CANCELED; in uv__getnameinfo_done()
91 } else if (req->retcode == 0) { in uv__getnameinfo_done()
92 host = req->host; in uv__getnameinfo_done()
93 service = req->service; in uv__getnameinfo_done()
96 if (req->getnameinfo_cb) in uv__getnameinfo_done()
97 req->getnameinfo_cb(req, req->retcode, host, service); in uv__getnameinfo_done()
107 uv_getnameinfo_t* req, in uv_getnameinfo() argument
111 if (req == NULL || addr == NULL) in uv_getnameinfo()
115 memcpy(&req->storage, in uv_getnameinfo()
119 memcpy(&req->storage, in uv_getnameinfo()
126 UV_REQ_INIT(req, UV_GETNAMEINFO); in uv_getnameinfo()
129 req->getnameinfo_cb = getnameinfo_cb; in uv_getnameinfo()
130 req->flags = flags; in uv_getnameinfo()
131 req->loop = loop; in uv_getnameinfo()
132 req->retcode = 0; in uv_getnameinfo()
136 &req->work_req, in uv_getnameinfo()
142 uv__getnameinfo_work(&req->work_req); in uv_getnameinfo()
143 uv__getnameinfo_done(&req->work_req, 0); in uv_getnameinfo()
144 return req->retcode; in uv_getnameinfo()