| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| | |
The principle can be used in a more general fashion than just TCP
streams.
|
| |
| |
| |
| | |
For readability.
|
| |
| |
| |
| |
| | |
We handled this in the failure scenario, but not in the vastly more
common successful case.
|
|/ |
|
|
|
|
|
|
|
|
| |
Created a new subclass of Exception called GAIException() that will
handle error messages from getaddrinfo() instead of letting Exception()
handle it. GAIException() will make use of gai_strerror() to map the
error code to text. On Windows, gai_strerrorW() must be used if the text
is encoded with UTF-8.
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| | |
It doesn't belong on each socket server object as timers are global.
Force implementations to call the Timer system directly instead,
avoiding any middle men.
|
|/
|
|
|
| |
It is functionality specific to WinVNC, so move the code there
to make things more clear.
|
| |
|
| |
|
|
|
|
| |
Patch originally by Dag-Erling Smørgrav for University of Oslo.
|
|
|
|
|
| |
Makes the code more general and not directly tied to specifically
TCP sockets.
|
|
|
|
|
|
| |
This makes it possible to create a derived class from Socket which is
not TCP based, without having VNCSConnectionST.cxx trying to call
setsockopt() on a non-socket.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix warnings emitted by Clang:
/home/shade/dev/tigervnc/common/rdr/FdInStream.h:30:9: error: 'rdr::FdInStreamBlockCallback' has virtual functions but non-virtual destructor [-Werror,-Wnon-virtual-dtor]
class FdInStreamBlockCallback {
^
In file included from /home/shade/dev/tigervnc/common/network/TcpSocket.cxx:44:
In file included from /home/shade/dev/tigervnc/common/network/TcpSocket.h:31:
/home/shade/dev/tigervnc/common/network/Socket.h:82:9: error: 'network::ConnectionFilter' has virtual functions but non-virtual destructor [-Werror,-Wnon-virtual-dtor]
class ConnectionFilter {
^
..etc
|
|
|
|
|
| |
Any caller using add or remove should also be able to list the
sockets.
|
|
|
|
|
|
| |
What to do when a socket is writeable should be handled in the
RFB core code as there may be other events we want to fire off
when this happens.
|
|
|
|
|
|
| |
The previous detection would fail if the socket closed before we
had time to inspect it, which got us stuck in a loop as we would
try (and fail) to do accept() on a non-listening socket.
|
|
|
|
|
|
| |
Parsing a filter might be the first thing we do so we need to
make sure the socket subsystem is running so that we can look
up names.
|
|
|
|
|
|
| |
It is easier to control object life time and avoid magical socket
duplication by having a single TcpListener object to pass around.
We have to be more careful about deleting the object though.
|
|
|
|
|
| |
Closing the socket might overwrite errno so we need to save
its value.
|
| |
|
| |
|
|
|
|
|
| |
The logic was flawed and would treat all connect errors as
if there were no addresses found.
|
| |
|
|
|
|
|
| |
SO_REUSEADDR needs to be set before we call bind() for it to have
any effect. It got shuffled around in e4d9726.
|
|
|
|
|
| |
Every reasonably current system support getaddrinfo() so get rid
of the legacy fallbacks.
|
| |
|
|
|
|
| |
It doesn't work on sockets, which require a bit more care.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
It is needed by WinVNC, but got removed in 892d10a70. Also fix
a couple of issues:
- Use getnameinfo() in order to be compatible with Windows XP
- Make it static since it doesn't use a specific socket
- Respect UseIPv4 and UseIPv6
- Flags for getaddrinfo() that match binding code
- Dummy service value for Windows compatibility
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The TcpListener constructor now takes a 'struct sockaddr*' instead of
a string, and the createTcpListeners function creates TcpListener
instances for an address based on the results from getaddrinfo().
The XserverDesktop class now takes a list of TcpListener instances for
each of the RFB and HTTP sockets.
The TcpListener::closeFd member variable is not used and has been
removed.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The logic is a bit complex so we're going to have to silence the
warning with this explicit assignment.
|
| |
|
| |
|
|
|
|
| |
They use char* rather than void*, requiring a cast here.
|
|
|
|
|
| |
This is the format we support when converting a string to an
address, so it makes sense to use them the other way around.
|
|
|
|
|
| |
There might be more protocols in the future, and we might also
misdetect things depending on varying IPv6 functions being missing.
|
| |
|
| |
|