[spice] turn on TCP_QUICKACK

https://assets.extrahop.com/whitepapers/TCP-Optimization-Guide-by-ExtraHop.pdf
This commit is contained in:
Geoffrey McRae
2020-01-11 16:03:28 +11:00
parent 5e915dd1ff
commit e554635e48
5 changed files with 12 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
cmake_minimum_required(VERSION 3.0)
project(spice LANGUAGES C)
set(CMAKE_C_STANDARD 11)
find_package(PkgConfig)
pkg_check_modules(SPICE_PKGCONFIG REQUIRED

View File

@@ -733,8 +733,9 @@ bool spice_connect_channel(struct SpiceChannel * channel)
if (spice.family != AF_UNIX)
{
int flag = 1;
setsockopt(channel->socket, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int));
const int flag = 1;
setsockopt(channel->socket, IPPROTO_TCP, TCP_NODELAY , &flag, sizeof(int));
setsockopt(channel->socket, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int));
}
if (connect(channel->socket, &spice.addr.addr, addrSize) == -1)

View File

@@ -49,6 +49,7 @@ struct AppState
bool drawCursor;
bool cursorInView;
bool updateCursor;
bool initialCursorSync;
float scaleX, scaleY;
float accX, accY;
int curLastX;