diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-06-22 01:10:38 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-06-22 01:10:38 +0900 |
| commit | 07d270c87e6f9184aea4ca17eb26e466712e8db2 (patch) | |
| tree | 2dfbaa2e0d2ad0f38cb73098608f7d67a64320f8 /src/FtpConnection.cc | |
| parent | 126a4bde612eb0e6c48cf2f13ebe3eac45cc71a8 (diff) | |
Require -std=c++11 and use std::shared_ptr instead of SharedHandle
Diffstat (limited to 'src/FtpConnection.cc')
| -rw-r--r-- | src/FtpConnection.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/FtpConnection.cc b/src/FtpConnection.cc index d05872cf..7e773cd2 100644 --- a/src/FtpConnection.cc +++ b/src/FtpConnection.cc @@ -62,9 +62,9 @@ namespace aria2 { FtpConnection::FtpConnection (cuid_t cuid, - const SharedHandle<SocketCore>& socket, - const SharedHandle<Request>& req, - const SharedHandle<AuthConfig>& authConfig, + const std::shared_ptr<SocketCore>& socket, + const std::shared_ptr<Request>& req, + const std::shared_ptr<AuthConfig>& authConfig, const Option* op) : cuid_(cuid), socket_(socket), @@ -199,17 +199,17 @@ bool FtpConnection::sendPasv() return socketBuffer_.sendBufferIsEmpty(); } -SharedHandle<SocketCore> FtpConnection::createServerSocket() +std::shared_ptr<SocketCore> FtpConnection::createServerSocket() { std::pair<std::string, uint16_t> addrinfo; socket_->getAddrInfo(addrinfo); - SharedHandle<SocketCore> serverSocket(new SocketCore()); + std::shared_ptr<SocketCore> serverSocket(new SocketCore()); serverSocket->bind(addrinfo.first.c_str(), 0, AF_UNSPEC); serverSocket->beginListen(); return serverSocket; } -bool FtpConnection::sendEprt(const SharedHandle<SocketCore>& serverSocket) +bool FtpConnection::sendEprt(const std::shared_ptr<SocketCore>& serverSocket) { if(socketBuffer_.sendBufferIsEmpty()) { sockaddr_union sockaddr; @@ -229,7 +229,7 @@ bool FtpConnection::sendEprt(const SharedHandle<SocketCore>& serverSocket) return socketBuffer_.sendBufferIsEmpty(); } -bool FtpConnection::sendPort(const SharedHandle<SocketCore>& serverSocket) +bool FtpConnection::sendPort(const std::shared_ptr<SocketCore>& serverSocket) { if(socketBuffer_.sendBufferIsEmpty()) { std::pair<std::string, uint16_t> addrinfo; @@ -249,7 +249,7 @@ bool FtpConnection::sendPort(const SharedHandle<SocketCore>& serverSocket) return socketBuffer_.sendBufferIsEmpty(); } -bool FtpConnection::sendRest(const SharedHandle<Segment>& segment) +bool FtpConnection::sendRest(const std::shared_ptr<Segment>& segment) { if(socketBuffer_.sendBufferIsEmpty()) { std::string request = |
