Skip to content

Commit 8ec9956

Browse files
authored
Update request.go
1 parent c0aabfa commit 8ec9956

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

request.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,15 @@ func (r *Request) NthRspHeaderValue(idx uint) (string, error) {
292292
return val, wrapRequestResult(ret, "")
293293
}
294294

295-
// TODO: RequestGetCompletionStatus
295+
func (r *Request) CompletionStatus() (uint, uint, error) {
296+
var state, status uint
297+
// args
298+
cstate := (*C.REQUEST_STATE)(unsafe.Pointer(&state))
299+
cstatus := (*C.UINT)(unsafe.Pointer(&status))
300+
// cgo call
301+
ret := C.RequestGetCompletionStatus(r.handle, cstate, cstatus)
302+
return state, status, wrapRequestResult(ret, "")
303+
}
296304

297305
func (r *Request) ProxyHost() (string, error) {
298306
var host string

0 commit comments

Comments
 (0)