mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-08 22:42:34 -04:00
Fix send buffer size for app and proxy
This commit is contained in:
parent
58e8d819c9
commit
1dd758c66a
3 changed files with 29 additions and 0 deletions
|
@ -28,6 +28,16 @@
|
|||
#include "sodium.h"
|
||||
#include <iostream>
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include <fcntl.h>
|
||||
#include <winsock2.h>
|
||||
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
BrowserHost::BrowserHost(QObject* parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
|
@ -77,6 +87,11 @@ void BrowserHost::readProxyMessage()
|
|||
}
|
||||
|
||||
socket->setReadBufferSize(BrowserShared::NATIVEMSG_MAX_LENGTH);
|
||||
int socketDesc = socket->socketDescriptor();
|
||||
if (socketDesc) {
|
||||
int max = BrowserShared::NATIVEMSG_MAX_LENGTH;
|
||||
setsockopt(socketDesc, SOL_SOCKET, SO_SNDBUF, reinterpret_cast<char*>(&max), sizeof(max));
|
||||
}
|
||||
|
||||
QJsonParseError error;
|
||||
auto json = QJsonDocument::fromJson(socket->readAll(), &error);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue