mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 06:47:19 +00:00
[spice] turn on TCP_QUICKACK
https://assets.extrahop.com/whitepapers/TCP-Optimization-Guide-by-ExtraHop.pdf
This commit is contained in:
parent
5e915dd1ff
commit
e554635e48
@ -1,5 +1,6 @@
|
|||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
project(spice LANGUAGES C)
|
project(spice LANGUAGES C)
|
||||||
|
set(CMAKE_C_STANDARD 11)
|
||||||
|
|
||||||
find_package(PkgConfig)
|
find_package(PkgConfig)
|
||||||
pkg_check_modules(SPICE_PKGCONFIG REQUIRED
|
pkg_check_modules(SPICE_PKGCONFIG REQUIRED
|
||||||
|
@ -733,8 +733,9 @@ bool spice_connect_channel(struct SpiceChannel * channel)
|
|||||||
|
|
||||||
if (spice.family != AF_UNIX)
|
if (spice.family != AF_UNIX)
|
||||||
{
|
{
|
||||||
int flag = 1;
|
const int flag = 1;
|
||||||
setsockopt(channel->socket, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int));
|
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)
|
if (connect(channel->socket, &spice.addr.addr, addrSize) == -1)
|
||||||
|
@ -49,6 +49,7 @@ struct AppState
|
|||||||
bool drawCursor;
|
bool drawCursor;
|
||||||
bool cursorInView;
|
bool cursorInView;
|
||||||
bool updateCursor;
|
bool updateCursor;
|
||||||
|
bool initialCursorSync;
|
||||||
float scaleX, scaleY;
|
float scaleX, scaleY;
|
||||||
float accX, accY;
|
float accX, accY;
|
||||||
int curLastX;
|
int curLastX;
|
||||||
|
@ -25,6 +25,12 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
#define INTERLOCKED_GET(x) __sync_fetch_and_add((x), 0)
|
#define INTERLOCKED_GET(x) __sync_fetch_and_add((x), 0)
|
||||||
#define INTERLOCKED_CE(x, c, v) __sync_val_compare_and_swap((x), (c), (v))
|
#define INTERLOCKED_CE(x, c, v) __sync_val_compare_and_swap((x), (c), (v))
|
||||||
|
|
||||||
|
#define INTERLOCKED_ENTER(lock) \
|
||||||
|
while(__sync_lock_test_and_set(&(lock), 1)) while((lock));
|
||||||
|
|
||||||
|
#define INTERLOCKED_EXIT(lock) \
|
||||||
|
__sync_lock_release(&(lock));
|
||||||
|
|
||||||
#define INTERLOCKED_SECTION(lock, x) \
|
#define INTERLOCKED_SECTION(lock, x) \
|
||||||
while(__sync_lock_test_and_set(&(lock), 1)) while((lock)); \
|
while(__sync_lock_test_and_set(&(lock), 1)) while((lock)); \
|
||||||
x\
|
x\
|
||||||
|
Loading…
Reference in New Issue
Block a user