diff options
| author | Stephen D. Huston <shuston@apache.org> | 2009-03-12 20:55:34 +0000 |
|---|---|---|
| committer | Stephen D. Huston <shuston@apache.org> | 2009-03-12 20:55:34 +0000 |
| commit | 0398410e8894287da530cfb63d6344817445bfc2 (patch) | |
| tree | e4d789cd965f25c8fb0a51e1cf71df0a5330e73b /cpp/src/qpid/sys/Socket.h | |
| parent | 47db7ebfc533d2dc8a3dfc3b9d1273730b8779e6 (diff) | |
| download | qpid-python-0398410e8894287da530cfb63d6344817445bfc2.tar.gz | |
Changes to build DLLs instead of static libs on Windows; primarily added decorators to exported names. Fixes QPID-1673
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@753014 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys/Socket.h')
| -rw-r--r-- | cpp/src/qpid/sys/Socket.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/cpp/src/qpid/sys/Socket.h b/cpp/src/qpid/sys/Socket.h index 9b749bdf5e..e6555f5774 100644 --- a/cpp/src/qpid/sys/Socket.h +++ b/cpp/src/qpid/sys/Socket.h @@ -24,7 +24,7 @@ #include "IOHandle.h" #include "qpid/sys/IntegerTypes.h" - +#include "qpid/CommonImportExport.h" #include <string> namespace qpid { @@ -36,7 +36,7 @@ class Socket : public IOHandle { public: /** Create a socket wrapper for descriptor. */ - Socket(); + QPID_COMMON_EXTERN Socket(); /** Create an initialized TCP socket */ void createTcp() const; @@ -47,21 +47,21 @@ public: /** Set socket non blocking */ void setNonblocking() const; - void connect(const std::string& host, uint16_t port) const; + QPID_COMMON_EXTERN void connect(const std::string& host, uint16_t port) const; - void close() const; + QPID_COMMON_EXTERN void close() const; /** Bind to a port and start listening. *@param port 0 means choose an available port. *@param backlog maximum number of pending connections. *@return The bound port. */ - int listen(uint16_t port = 0, int backlog = 10) const; + QPID_COMMON_EXTERN int listen(uint16_t port = 0, int backlog = 10) const; /** Returns the "socket name" ie the address bound to * the near end of the socket */ - std::string getSockname() const; + QPID_COMMON_EXTERN std::string getSockname() const; /** Returns the "peer name" ie the address bound to * the remote end of the socket @@ -72,14 +72,14 @@ public: * Returns an address (host and port) for the remote end of the * socket */ - std::string getPeerAddress() const; + QPID_COMMON_EXTERN std::string getPeerAddress() const; /** * Returns an address (host and port) for the local end of the * socket */ std::string getLocalAddress() const; - uint16_t getLocalPort() const; + QPID_COMMON_EXTERN uint16_t getLocalPort() const; uint16_t getRemotePort() const; /** @@ -91,13 +91,13 @@ public: /** Accept a connection from a socket that is already listening * and has an incoming connection */ - Socket* accept() const; + QPID_COMMON_EXTERN Socket* accept() const; // TODO The following are raw operations, maybe they need better wrapping? - int read(void *buf, size_t count) const; - int write(const void *buf, size_t count) const; + QPID_COMMON_EXTERN int read(void *buf, size_t count) const; + QPID_COMMON_EXTERN int write(const void *buf, size_t count) const; - void setTcpNoDelay(bool nodelay) const; + QPID_COMMON_EXTERN void setTcpNoDelay(bool nodelay) const; private: Socket(IOHandlePrivate*); |
