summaryrefslogtreecommitdiff
path: root/src/SocketCore.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-07-30 14:45:35 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-07-30 14:45:35 +0000
commit7958ce43662d8dd070f2ca71c06ca630198568ef (patch)
tree023ab57b1c8f575ef3b55895447d9bba49474e26 /src/SocketCore.h
parent20b7c8cd0e058ba74bc311c855db6111726276ef (diff)
2010-07-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added FTP EPSV and EPRT command support. aria2 issues these commands when address family of local socket is AF_INET6. * src/FtpConnection.cc * src/FtpConnection.h * src/FtpNegotiationCommand.cc * src/FtpNegotiationCommand.h * src/SocketCore.cc * src/SocketCore.h * test/FtpConnectionTest.cc
Diffstat (limited to 'src/SocketCore.h')
-rw-r--r--src/SocketCore.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/SocketCore.h b/src/SocketCore.h
index 67585bc3..7de5a0eb 100644
--- a/src/SocketCore.h
+++ b/src/SocketCore.h
@@ -160,6 +160,21 @@ public:
void getAddrInfo(std::pair<std::string, uint16_t>& addrinfo) const;
/**
+ * Stores address of this socket to sockaddr. len must be
+ * initialized to the size of sockaddr. On success, address data is
+ * stored in sockaddr and actual size of address structure is stored
+ * in len.
+ */
+ void getAddrInfo
+ (struct sockaddr_storage& sockaddr, socklen_t& len) const;
+
+ /**
+ * Returns address family of this socket.
+ * The socket must be connected or bounded to address.
+ */
+ int getAddressFamily() const;
+
+ /**
* Stores peer's address and port to peerinfo.
* @param peerinfo placeholder to store peer's address and port.
*/