diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-05-06 07:42:59 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-05-06 07:42:59 +0000 |
| commit | d05d8bbddc505a0117010dd05da4d9b89c0c728f (patch) | |
| tree | 116243ba6b724c5784b0352b401db1d8fc2bdb83 /src/SocketCore.h | |
| parent | 47b08786eb458f709377871dae5c83fe3b7e5b0d (diff) | |
2009-05-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added static member _protocolFamily to SocketCore. By default,
SocketCore uses AF_UNSPEC for getaddrinfo hints to resolve
address. Sometime SocketCore::bind() and
SocketCore::establishConnection() use difference protocl family
and latter cannot connect to former. To avoid this situation, we
limit protocol family to AF_INET for unit tests.
* src/SocketCore.cc
* src/SocketCore.h
* test/AllTest.cc
Diffstat (limited to 'src/SocketCore.h')
| -rw-r--r-- | src/SocketCore.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/SocketCore.h b/src/SocketCore.h index 1c0c553e..aa46dc71 100644 --- a/src/SocketCore.h +++ b/src/SocketCore.h @@ -90,6 +90,8 @@ private: static PollMethod _pollMethod; + static int _protocolFamily; + bool blocking; int secure; @@ -341,6 +343,11 @@ public: #ifdef ENABLE_SSL static void setTLSContext(const SharedHandle<TLSContext>& tlsContext); #endif // ENABLE_SSL + + static void setProtocolFamily(int protocolFamily) + { + _protocolFamily = protocolFamily; + } }; } // namespace aria2 |
