mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-12 06:35:04 +08:00
Revert "Add keepAlive message before send file/clipboard data #4768"
This reverts commit 5287c62540b277474603ea8a38c53b50cb8f4d52.
This commit is contained in:
committed by
Xinyu Hou
parent
b5b2cdfade
commit
7cbd3fdcb4
@@ -252,7 +252,9 @@ ServerProxy::parseMessage(const UInt8* code)
|
||||
}
|
||||
|
||||
else if (memcmp(code, kMsgCKeepAlive, 4) == 0) {
|
||||
keepAlive();
|
||||
// echo keep alives and reset alarm
|
||||
ProtocolUtil::writef(m_stream, kMsgCKeepAlive);
|
||||
resetKeepAliveAlarm();
|
||||
}
|
||||
|
||||
else if (memcmp(code, kMsgCNoop, 4) == 0) {
|
||||
@@ -890,21 +892,12 @@ ServerProxy::dragInfoReceived()
|
||||
void
|
||||
ServerProxy::handleClipboardSendingEvent(const Event& event, void*)
|
||||
{
|
||||
keepAlive();
|
||||
ClipboardChunk::send(m_stream, event.getData());
|
||||
}
|
||||
|
||||
void ServerProxy::keepAlive()
|
||||
{
|
||||
// echo keep alives and reset alarm
|
||||
ProtocolUtil::writef(m_stream, kMsgCKeepAlive);
|
||||
resetKeepAliveAlarm();
|
||||
}
|
||||
|
||||
void
|
||||
ServerProxy::fileChunkSending(UInt8 mark, char* data, size_t dataSize)
|
||||
{
|
||||
keepAlive();
|
||||
FileChunk::send(m_stream, mark, data, dataSize);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user