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 | b2c842c1b7361bc9754a9883e82ae360093f11a8 (patch) | |
tree | a1d8d7f84ac53c5857ad964ad500e69704f669e5 /qpid/cpp/src/qpid/sys/Socket.h | |
parent | 6a644249ba25e38dfa6852dac3377e62aa7386df (diff) | |
download | qpid-python-b2c842c1b7361bc9754a9883e82ae360093f11a8.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@753014 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/qpid/sys/Socket.h')
-rw-r--r-- | qpid/cpp/src/qpid/sys/Socket.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/qpid/cpp/src/qpid/sys/Socket.h b/qpid/cpp/src/qpid/sys/Socket.h index 9b749bdf5e..e6555f5774 100644 --- a/qpid/cpp/src/qpid/sys/Socket.h +++ b/qpid/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*); |