mirror of
https://git.suyu.dev/suyu/discord-rpc.git
synced 2025-12-27 17:57:16 +01:00
wip what layer some things should be in, mostly async now
This commit is contained in:
parent
9dc93f64b8
commit
0f10ebff43
5 changed files with 211 additions and 54 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue