This enables setting the DSCP/Traffic Class field of IP/IPv6 packets
sent by a client. For example starting a client with -qosdscp 184
marks all outgoing traffic for expedited forwarding.
Implementation for Win32 is still a TODO, though. See
http://betelco.blogspot.com/2009/03/dscp-marking-under-windows-at.html
for an overview of the Win32 QoS API mess...
The hook is still called after InitialiseRFBConnection() so we can choose
the color settings depending on the vnc server (or settings) in that hook.
This way one can use the "VNC server default format" pixelformat if the
client supports it, or perform a workaround (Intel AMT KVM "classic vnc"
server only works using 8bit colors in RFB3.8)
Signed-off-by: Wouter Van Meir <wouter.vanmeir@pandora.be>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The serverPort member is already set in rfbGetClient(), if we
set it again in rfbInitClient(), this breaks playing of vncrec
files (this relies on serverPort set to -1).
Signed-off-by: Christian Beier <dontmind@freeshell.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
[jes: adjusted coding style, made sure port is initialized correctly]
Signed-off-by: Vic Lee <llyzs@163.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
To make this work, we also have to initialize sockets
to a default value of -1.
Also close a client listen socket if it's open.
Signed-off-by: Christian Beier <dontmind@freeshell.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
fixes warning about closesocket being implicitly declared.
Signed-off-by: Christian Beier <dontmind@freeshell.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Forking the whole process from deep within a library call does
not really work at all with apps that use multiple threads, i.e. every
reasonably modern GUI app. So, provide a non-forking listen function so
that the caller can decide if to fork, start a thread, etc.
This implementation adds a timeout parameter to be able to call the
listen function multiple times so that it's possible to do sth. else
in between, e.g. abort listening.
Signed-off-by: Christian Beier <dontmind@freeshell.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
When working on a program which searches the display for some image, one
does not want to search again without getting an FB update. Add a
callback to make this possible.
There was an unnecessary assignment, and an assignment of a string that
was to be free()ed later, so it has to be strdup()ed.
Both issues spotted by Roman Held.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>