diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2012-10-24 05:51:31 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2012-10-24 05:51:31 +0000 |
| commit | e9af3d4c50c322615b9486fdccde807a621648c7 (patch) | |
| tree | da83a8d381028880ab45f6486ade1cf8baa096b3 /cpp/src/qpid/sys/TCPIOPlugin.cpp | |
| parent | 29d3d257a0df2e3f9d0386e534411c7f3806fa85 (diff) | |
| download | qpid-python-e9af3d4c50c322615b9486fdccde807a621648c7.tar.gz | |
QPID-4272: Large amounts of code are duplicated between the SSL and TCP transports
Lift Socket into an interface with concrete implementations
- BSDSocket, WinSocket and SslSocket
- As a side effect completely change the approach we use for platform
specific handles: IOHandle now directly carries the platform handle
but its real type is only exposed to platform specific code.
- Modified RDMA code for the new IOHandle approach
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1401559 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys/TCPIOPlugin.cpp')
| -rw-r--r-- | cpp/src/qpid/sys/TCPIOPlugin.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/src/qpid/sys/TCPIOPlugin.cpp b/cpp/src/qpid/sys/TCPIOPlugin.cpp index ed7cc3748d..2ff47e982c 100644 --- a/cpp/src/qpid/sys/TCPIOPlugin.cpp +++ b/cpp/src/qpid/sys/TCPIOPlugin.cpp @@ -126,7 +126,7 @@ AsynchIOProtocolFactory::AsynchIOProtocolFactory(const std::string& host, const // We must have at least one resolved address QPID_LOG(info, "Listening to: " << sa.asString()) - Socket* s = new Socket; + Socket* s = createSocket(); uint16_t lport = s->listen(sa, backlog); QPID_LOG(debug, "Listened to: " << lport); listeners.push_back(s); @@ -138,7 +138,7 @@ AsynchIOProtocolFactory::AsynchIOProtocolFactory(const std::string& host, const // Hack to ensure that all listening connections are on the same port sa.setAddrInfoPort(listeningPort); QPID_LOG(info, "Listening to: " << sa.asString()) - Socket* s = new Socket; + Socket* s = createSocket(); uint16_t lport = s->listen(sa, backlog); QPID_LOG(debug, "Listened to: " << lport); listeners.push_back(s); @@ -204,7 +204,7 @@ void AsynchIOProtocolFactory::connect( // upon connection failure or by the AsynchIO upon connection // shutdown. The allocated AsynchConnector frees itself when it // is no longer needed. - Socket* socket = new Socket(); + Socket* socket = createSocket(); try { AsynchConnector* c = AsynchConnector::create( *socket, |
