补充写入请求指令Write()
This commit is contained in:
parent
cea66d5556
commit
b6854edecd
|
@ -899,12 +899,12 @@ int TokenClient::WriteAsync(int start, const Buffer& bs, int msTimeout)
|
||||||
handle.State = (void*)start;
|
handle.State = (void*)start;
|
||||||
|
|
||||||
_Expect = &handle;
|
_Expect = &handle;
|
||||||
|
Write(start, bs);
|
||||||
handle.WaitOne(msTimeout);
|
handle.WaitOne(msTimeout);
|
||||||
if (_Expect == &handle) _Expect = nullptr;
|
if (_Expect == &handle) _Expect = nullptr;
|
||||||
|
|
||||||
// 可能失败
|
// 可能失败
|
||||||
if (!handle.Result) return 0;
|
if (!handle.Result) return 1;
|
||||||
|
|
||||||
return (int)handle.State;
|
return (int)handle.State;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue