summaryrefslogtreecommitdiff
path: root/src/SocketCore.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-06-22 01:10:38 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-06-22 01:10:38 +0900
commit07d270c87e6f9184aea4ca17eb26e466712e8db2 (patch)
tree2dfbaa2e0d2ad0f38cb73098608f7d67a64320f8 /src/SocketCore.cc
parent126a4bde612eb0e6c48cf2f13ebe3eac45cc71a8 (diff)
Require -std=c++11 and use std::shared_ptr instead of SharedHandle
Diffstat (limited to 'src/SocketCore.cc')
-rw-r--r--src/SocketCore.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/SocketCore.cc b/src/SocketCore.cc
index be8be55f..a3f24306 100644
--- a/src/SocketCore.cc
+++ b/src/SocketCore.cc
@@ -134,17 +134,17 @@ std::vector<std::pair<sockaddr_union, socklen_t> >
SocketCore::bindAddrs_;
#ifdef ENABLE_SSL
-SharedHandle<TLSContext> SocketCore::clTlsContext_;
-SharedHandle<TLSContext> SocketCore::svTlsContext_;
+std::shared_ptr<TLSContext> SocketCore::clTlsContext_;
+std::shared_ptr<TLSContext> SocketCore::svTlsContext_;
void SocketCore::setClientTLSContext
-(const SharedHandle<TLSContext>& tlsContext)
+(const std::shared_ptr<TLSContext>& tlsContext)
{
clTlsContext_ = tlsContext;
}
void SocketCore::setServerTLSContext
-(const SharedHandle<TLSContext>& tlsContext)
+(const std::shared_ptr<TLSContext>& tlsContext)
{
svTlsContext_ = tlsContext;
}
@@ -344,7 +344,7 @@ void SocketCore::beginListen()
setNonBlockingMode();
}
-SharedHandle<SocketCore> SocketCore::acceptConnection() const
+std::shared_ptr<SocketCore> SocketCore::acceptConnection() const
{
sockaddr_union sockaddr;
socklen_t len = sizeof(sockaddr);
@@ -355,7 +355,7 @@ SharedHandle<SocketCore> SocketCore::acceptConnection() const
if(fd == (sock_t) -1) {
throw DL_ABORT_EX(fmt(EX_SOCKET_ACCEPT, errorMsg(errNum).c_str()));
}
- SharedHandle<SocketCore> sock(new SocketCore(fd, sockType_));
+ std::shared_ptr<SocketCore> sock(new SocketCore(fd, sockType_));
sock->setNonBlockingMode();
return sock;
}