wip what layer some things should be in, mostly async now

This commit is contained in:
Chris Marsh
2017-07-17 14:49:31 -07:00
parent 9dc93f64b8
commit 0f10ebff43
5 changed files with 211 additions and 54 deletions

View File

@ -59,11 +59,7 @@ bool BaseConnection::Close()
bool BaseConnection::Write(const void* data, size_t length)
{
auto self = reinterpret_cast<BaseConnectionWin*>(this);
BOOL success = ::WriteFile(self->pipe, data, length, nullptr, nullptr);
if (!success) {
self->Close();
}
return success;
return ::WriteFile(self->pipe, data, length, nullptr, nullptr) == TRUE;
}
bool BaseConnection::Read(void* data, size_t length)