diff options
author | Pierre Ossman <ossman@cendio.se> | 2024-11-15 19:16:08 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2025-02-13 11:10:14 +0100 |
commit | 3861097921de71b8a742c1f70bc991b3518f5dd7 (patch) | |
tree | d6aa45c647e408e15fed860e3b1ffb216a7dcfb8 /common/network | |
parent | d96242158d4c3b3247e55fbe4c968994c0fd9773 (diff) | |
download | tigervnc-3861097921de71b8a742c1f70bc991b3518f5dd7.tar.gz tigervnc-3861097921de71b8a742c1f70bc991b3518f5dd7.zip |
Reduce header #include:s
Make compile times faster by reducing the number of headers included in
other headers.
Diffstat (limited to 'common/network')
-rw-r--r-- | common/network/Socket.cxx | 13 | ||||
-rw-r--r-- | common/network/Socket.h | 11 | ||||
-rw-r--r-- | common/network/TcpSocket.cxx | 1 | ||||
-rw-r--r-- | common/network/UnixSocket.cxx | 1 |
4 files changed, 22 insertions, 4 deletions
diff --git a/common/network/Socket.cxx b/common/network/Socket.cxx index 49abbc84..f7ce026e 100644 --- a/common/network/Socket.cxx +++ b/common/network/Socket.cxx @@ -41,6 +41,9 @@ #include <rdr/Exception.h> +#include <rdr/FdInStream.h> +#include <rdr/FdOutStream.h> + #include <network/Socket.h> #include <rfb/LogWriter.h> @@ -99,6 +102,11 @@ Socket::~Socket() delete outstream; } +int Socket::getFd() +{ + return outstream->getFd(); +} + // if shutdown() is overridden then the override MUST call on to here void Socket::shutdown() { @@ -122,6 +130,11 @@ bool Socket::isShutdown() const return isShutdown_; } +void Socket::cork(bool enable) +{ + outstream->cork(enable); +} + // Was there a "?" in the ConnectionFilter used to accept this Socket? void Socket::setRequiresQuery() { diff --git a/common/network/Socket.h b/common/network/Socket.h index 34b8db8e..f1688c72 100644 --- a/common/network/Socket.h +++ b/common/network/Socket.h @@ -24,8 +24,11 @@ #include <list> #include <limits.h> -#include <rdr/FdInStream.h> -#include <rdr/FdOutStream.h> + +namespace rdr { + class FdInStream; + class FdOutStream; +} namespace network { @@ -40,12 +43,12 @@ namespace network { rdr::FdInStream &inStream() {return *instream;} rdr::FdOutStream &outStream() {return *outstream;} - int getFd() {return outstream->getFd();} + int getFd(); void shutdown(); bool isShutdown() const; - void cork(bool enable) { outstream->cork(enable); } + void cork(bool enable); // information about the remote end of the socket virtual const char* getPeerAddress() = 0; // a string e.g. "192.168.0.1" diff --git a/common/network/TcpSocket.cxx b/common/network/TcpSocket.cxx index c5b86543..a4eaf060 100644 --- a/common/network/TcpSocket.cxx +++ b/common/network/TcpSocket.cxx @@ -36,6 +36,7 @@ #endif #include <stdlib.h> +#include <string.h> #include <unistd.h> #include <rdr/Exception.h> diff --git a/common/network/UnixSocket.cxx b/common/network/UnixSocket.cxx index 48561245..66c505a8 100644 --- a/common/network/UnixSocket.cxx +++ b/common/network/UnixSocket.cxx @@ -28,6 +28,7 @@ #include <errno.h> #include <stdlib.h> #include <stddef.h> +#include <string.h> #include <rdr/Exception.h> |