summaryrefslogtreecommitdiff
path: root/src/SocketCore.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-11-14 23:19:37 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-11-14 23:19:37 +0900
commit27dda3c65c263a9dcc6b4a4e38f67e6ee0bc9a78 (patch)
treecf883a8b6b4f94243c1386c3330097a4f881592b /src/SocketCore.h
parent97a9242cbe618ac3c2e3e89c30ee8018268e35a3 (diff)
Support IPv6 address for FTP via HTTP tunneling.
We use control connection address as data connection address, so we don't need to store both address and port. We just store port in PASV/EPSV response and use SocketCore::getPeerInfo() to get peer's address when needed.
Diffstat (limited to 'src/SocketCore.h')
-rw-r--r--src/SocketCore.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/SocketCore.h b/src/SocketCore.h
index 94db37ee..eaf6d946 100644
--- a/src/SocketCore.h
+++ b/src/SocketCore.h
@@ -147,10 +147,12 @@ public:
void beginListen();
/**
- * Stores host address and port of this socket to addrinfo.
+ * Stores host address and port of this socket to addrinfo and
+ * returns address family.
+ *
* @param addrinfo placeholder to store host address and port.
*/
- void getAddrInfo(std::pair<std::string, uint16_t>& addrinfo) const;
+ int getAddrInfo(std::pair<std::string, uint16_t>& addrinfo) const;
/**
* Stores address of this socket to sockaddr. len must be
@@ -168,10 +170,12 @@ public:
int getAddressFamily() const;
/**
- * Stores peer's address and port to peerinfo.
+ * Stores peer's address and port to peerinfo and returns address
+ * family.
+ *
* @param peerinfo placeholder to store peer's address and port.
*/
- void getPeerInfo(std::pair<std::string, uint16_t>& peerinfo) const;
+ int getPeerInfo(std::pair<std::string, uint16_t>& peerinfo) const;
/**
* Accepts incoming connection on this socket.