diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2008-04-15 15:41:21 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2008-04-15 15:41:21 +0000 |
| commit | dd53b33c3badd538d2d25a35146d9ab032573cc0 (patch) | |
| tree | 305a9f3e6cdc5d88d6c78638c75dda9d3ddb9831 /cpp/src/qpid/sys/Socket.h | |
| parent | 8ac8e19e4805e78c3adcab66f1aab2ef5190f48e (diff) | |
| download | qpid-python-dd53b33c3badd538d2d25a35146d9ab032573cc0.tar.gz | |
Refactored the IO framework that sits on top of Poller so that it uses a generalised IOHandle.
This means that you can define new classes derived from IOHandle (other than Socket) that
can also be added to a Poller and waited for.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@648288 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys/Socket.h')
| -rw-r--r-- | cpp/src/qpid/sys/Socket.h | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/cpp/src/qpid/sys/Socket.h b/cpp/src/qpid/sys/Socket.h index 0ebfc0c330..cab95654ad 100644 --- a/cpp/src/qpid/sys/Socket.h +++ b/cpp/src/qpid/sys/Socket.h @@ -21,25 +21,22 @@ * under the License. * */ +#include "IOHandle.h" + #include <string> -#include "qpid/sys/Time.h" struct sockaddr; namespace qpid { namespace sys { -class SocketPrivate; -class Socket -{ - friend class Poller; - - SocketPrivate* const impl; +class Duration; +class Socket : public IOHandle +{ public: /** Create a socket wrapper for descriptor. */ Socket(); - ~Socket(); /** Create an initialized TCP socket */ void createTcp() const; @@ -106,10 +103,8 @@ public: int read(void *buf, size_t count) const; int write(const void *buf, size_t count) const; - int toFd() const; - private: - Socket(SocketPrivate*); + Socket(IOHandlePrivate*); }; }} |
