summaryrefslogtreecommitdiff
path: root/src/SocketCore.h
Commit message (Collapse)AuthorAgeFilesLines
* Abstract TLS session implementationTatsuhiro Tsujikawa2013-04-031-29/+8
| | | | | Now TLS session object is abstracted as TLSSession class. Currently, we have GNUTLS and OpenSSL implementations.
* Check non-loopback (and non-linklocak for IPv6) address is configuredTatsuhiro Tsujikawa2013-03-311-0/+6
| | | | | | Issue A record query only when non-loopback IPv4 address is configured. Likewise, issue AAA record query only when non-loopback and non-linklocak IPv6 address is configured.
* Fix failure to set TCP_NODELAY on WindowsTatsuhiro Tsujikawa2013-02-031-1/+3
| | | | | On Windows setting TCP_NODELAY after non-blocking connect fails at least on Windows 7.
* Made SocketCore::readData() and readDataFrom() take void*Tatsuhiro Tsujikawa2013-01-111-14/+2
|
* Vectorized write for SocketBuffer to avoid small packetTatsuhiro Tsujikawa2013-01-111-12/+3
|
* Fixed compile error without SSL/TLS librelease-1.16.0Tatsuhiro Tsujikawa2012-12-011-3/+6
|
* Made socket non-blocking mode in SocketCore::acceptConnection()Tatsuhiro Tsujikawa2012-11-281-2/+2
|
* SocketCore::bind now accepts const char* host instead of std::stringTatsuhiro Tsujikawa2012-11-151-1/+1
|
* RPC over SSL/TLS transportTatsuhiro Tsujikawa2012-09-301-12/+25
| | | | | | | To enable RPC over SSL/TLS, specify server certificate and private key using --rpc-certificate and --rpc-private-key options and enable --rpc-secure option. After the encryption is enabled, use https and wss scheme to access RPC server.
* Removed dependency on inet_atonTatsuhiro Tsujikawa2012-05-141-1/+8
| | | | | | | Implemented inetPton as a replacement of inet_aton. inetPton is implemented using net::getBinAddr. This change fixes bug#3525424.
* Rewritten TLS hostname check based on RFC 6125.Tatsuhiro Tsujikawa2012-03-301-0/+7
|
* Enable TCP_NODELAY for WebSocket connection.Tatsuhiro Tsujikawa2012-03-211-0/+3
|
* Support IPv6 address for FTP via HTTP tunneling.Tatsuhiro Tsujikawa2011-11-141-4/+8
| | | | | | | 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.
* Use sockaddr_union instead of sockaddr_storage.Tatsuhiro Tsujikawa2011-10-201-4/+4
|
* Rewritten util::inSameCidrBlock() to support IPv6 address.Tatsuhiro Tsujikawa2011-10-191-0/+12
| | | | We also introduced union sockaddr_union in a2netcompat.h.
* Eliminated inet_ntoa and inet_ntop. Use getnameinfo() instead.Tatsuhiro Tsujikawa2011-08-201-0/+5
|
* Replaced HAVE_LIBSSL with HAVE_OPENSSLTatsuhiro Tsujikawa2011-02-181-4/+4
|
* Removed SocketCore::peekData()Tatsuhiro Tsujikawa2011-01-161-24/+0
|
* 2010-10-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-10-311-3/+3
| | | | | | Made #include guard consistent for c++ header files.
* 2010-08-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-08-071-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added IPv6 DHT. Added --dht-entry-porint6, --dht-file-path6, --dht-listen-addr6 and --enable-dht6 option. IPv6 DHT is disabled by default. To use IPv6 DHT, you need to use --enable-dht6 and specify a global unicast address to --dht-listen-addr6. IPv6 DHT is highly experimental. * src/BtSetup.cc * src/DHTAutoSaveCommand.cc * src/DHTAutoSaveCommand.h * src/DHTConnectionImpl.cc * src/DHTConnectionImpl.h * src/DHTEntryPointNameResolveCommand.cc * src/DHTFindNodeReplyMessage.cc * src/DHTFindNodeReplyMessage.h * src/DHTGetPeersMessage.cc * src/DHTGetPeersReplyMessage.cc * src/DHTGetPeersReplyMessage.h * src/DHTMessageFactory.h * src/DHTMessageFactoryImpl.cc * src/DHTMessageFactoryImpl.h * src/DHTMessageTracker.cc * src/DHTRegistry.cc * src/DHTRegistry.h * src/DHTRoutingTableDeserializer.cc * src/DHTRoutingTableDeserializer.h * src/DHTRoutingTableSerializer.cc * src/DHTRoutingTableSerializer.h * src/DHTSetup.cc * src/DHTSetup.h * src/FtpConnection.cc * src/LpdMessageReceiver.cc * src/OptionHandlerFactory.cc * src/OptionHandlerImpl.h * src/PeerInteractionCommand.cc * src/RequestGroup.cc * src/SocketCore.cc * src/SocketCore.h * src/bittorrent_helper.cc * src/bittorrent_helper.h * src/prefs.cc * src/prefs.h * src/usage_text.h * test/DHTConnectionImplTest.cc * test/DHTFindNodeReplyMessageTest.cc * test/DHTGetPeersMessageTest.cc * test/DHTGetPeersReplyMessageTest.cc * test/DHTMessageFactoryImplTest.cc * test/DHTRoutingTableDeserializerTest.cc * test/DHTRoutingTableSerializerTest.cc * test/LpdMessageDispatcherTest.cc * test/MockDHTMessageFactory.h
* 2010-07-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-07-301-0/+15
| | | | | | | | | | | | | | 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
* 2010-06-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-211-23/+23
| | | | | | | Changed naming standards for class member variable: now it looks like var_ instead of _var.
* 2010-06-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-121-11/+11
| | | | | | | | Renamed member variables * src/SocketCore.cc * src/SocketCore.h
* 2010-04-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-04-241-44/+0
| | | | | | | | | | | | In SocketCore::isReadable()/isWritable(), use poll() if it is available otherwise use select(). Removed epoll/port from there because poll() does the good enough job for single socket event notification. * src/SocketCore.cc * src/SocketCore.h * src/main.cc
* 2010-04-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-04-211-2/+11
| | | | | | | | | | | | | | | | | Added opensolaris port_associate() support. * src/DownloadEngineFactory.cc * src/Makefile.am * src/OptionHandlerFactory.cc * src/PortEventPoll.cc * src/PortEventPoll.h * src/SocketCore.cc * src/SocketCore.h * src/configure.ac * src/main.cc * src/prefs.cc * src/prefs.h
* 2010-04-19 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-04-191-1/+6
| | | | | | | | | | | | | | | | | | | | | Supported poll() for socket event notification. --event-poll can take value "poll". Fixed the bug that timeout for SocketCore::isReadable()/isWritable() is ignored when epoll is used. * src/OptionHandlerFactory.cc * src/a2io.h * src/prefs.h * src/SocketCore.h * src/Makefile.am * src/main.cc * src/PollEventPoll.h * src/SocketCore.cc * src/DownloadEngineFactory.cc * src/PollEventPoll.cc * src/prefs.cc * configure.ac
* 2010-04-16 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-04-161-0/+2
| | | | | | | | | | | | | Fixed compile error with openssl 1.1.0 and mingw32. * src/AsyncNameResolver.cc * src/LogFactory.cc * src/Logger.cc * src/Logger.h * src/SocketCore.cc * src/SocketCore.h * src/a2netcompat.h
* 2010-02-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-02-231-3/+4
| | | | | | | | | | | Added aiFlags argument to getInterfaceAddress(). Use AI_NUMERICHOST to find interface specified using --bt-lpd-interface option to avoid time-consuming address lookup. * src/BtSetup.cc * src/SocketCore.cc * src/SocketCore.h
* 2010-02-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-02-221-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | Added --bt-lpd-interface option to specify the interface to use for Local Peer Discovery. LpdMessageDispatcher object now has its own socket. LpdMessageReceiver's socket is binded to multicast address to only receive multicast packets. * src/BtSetup.cc * src/LpdMessageDispatcher.cc * src/LpdMessageDispatcher.h * src/LpdMessageReceiver.cc * src/LpdMessageReceiver.h * src/LpdReceiveMessageCommand.cc * src/LpdReceiveMessageCommand.h * src/OptionHandlerFactory.cc * src/SocketCore.cc * src/SocketCore.h * src/prefs.cc * src/prefs.h * src/usage_text.h * test/LpdMessageDispatcherTest.cc * test/LpdMessageReceiverTest.cc
* 2010-02-22 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-02-211-0/+12
| | | | | | | | | Put the portion of code to get interface addresses in SocketCore::bindAddress() into newly added getInterfaceAddress(). * src/SocketCore.cc * src/SocketCore.h
* 2010-02-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-02-201-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added Local Peer Discovery. It is disabled by default. Use --bt-enable-lpd to enable the function. * src/BtConstants.h * src/BtSetup.cc * src/LpdDispatchMessageCommand.cc * src/LpdDispatchMessageCommand.h * src/LpdMessage.h * src/LpdMessageDispatcher.cc * src/LpdMessageDispatcher.h * src/LpdMessageReceiver.cc * src/LpdMessageReceiver.h * src/LpdReceiveMessageCommand.cc * src/LpdReceiveMessageCommand.h * src/Makefile.am * src/OptionHandlerFactory.cc * src/Peer.cc * src/Peer.h * src/PeerInteractionCommand.cc * src/SocketCore.cc * src/SocketCore.h * src/prefs.cc * src/prefs.h * src/usage_text.h * src/util.cc * src/util.h * test/LpdMessageDispatcherTest.cc * test/LpdMessageReceiverTest.cc * test/Makefile.am
* 2010-02-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-02-151-4/+0
| | | | | | | | | Fixed error code handling so that it can handle Winsock2 error code. * src/SocketCore.cc * src/SocketCore.h
* 2010-01-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-01-091-1/+4
| | | | | | | | | | | | | | | | Fixed compile error with i586-mingw32msvc-gcc 4.4.2, without any additional libraries. * src/MultiUrlRequestInfo.cc * src/NameResolver.cc * src/SelectEventPoll.cc * src/SelectEventPoll.h * src/SocketCore.cc * src/SocketCore.h * src/a2netcompat.h * src/daemon.cc * src/main.cc
* 2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-01-051-8/+8
| | | | | | | | | Untabify. Fixed one line in copyright which is longer than 80 columns. * src * test
* 2009-12-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-12-241-0/+12
| | | | | | | | | | | | | | Use AI_ADDRCONFIG flag if it is available. Refactored so that getaddrinfo calls are not scattered around. Unset AI_ADDRCONFIG when conducting unit tests because they fail if networking interface is not configured with IPv4 address. * src/NameResolver.cc * src/SocketCore.cc * src/SocketCore.h * src/a2netcompat.h * test/AllTest.cc
* 2009-12-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-12-061-3/+2
| | | | | | | | | Store all addresses found by getifaddrs() and getaddrinfo(). In bind, try all addresses until success * src/SocketCore.cc * src/SocketCore.h
* 2009-12-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-12-031-0/+13
| | | | | | | | | | | | | | | | | Added --interface option. This feature binds sockets to given interface. You can specify interface name, IP address and hostname. * configure.ac * src/OptionHandlerFactory.cc * src/SocketCore.cc * src/SocketCore.h * src/main.cc * src/message.h * src/prefs.cc * src/prefs.h * src/usage_text.h
* 2009-08-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-08-301-1/+2
| | | | | | | | | | | | | | | | Added --xml-rpc-listen-all option. If true is given to this option, aria2 listens incoming XML-RPC requests on all network interfaces. If false is given, listens only on local loopback interface. The default value is false. * src/HttpListenCommand.cc * src/OptionHandlerFactory.cc * src/SocketCore.cc * src/SocketCore.h * src/prefs.cc * src/prefs.h * src/usage_text.h
* Added (sock_t) to quiet compiler warnings in MinGWRoss Smith II2009-06-021-6/+6
|
* 2009-05-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-05-061-0/+7
| | | | | | | | | | | | | | 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
* 2009-02-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-02-061-3/+2
| | | | | | | | | | Fixed compile error when HAVE_EPOLL is not defined. Fixed linker error on bigendian systems. * src/SocketCore.cc * src/SocketCore.h * test/DefaultBtProgressInfoFileTest.cc
* 2009-01-16 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-01-151-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added --event-poll option to select the method for polling events. The available methods are "select" and "epoll". "epoll" is available on Linux only. The earlier release has the compile option to choose from these methods. * configure.ac * src/RequestGroupMan.cc * src/OptionHandlerFactory.cc * src/EpollEventPoll.h * src/StreamFileAllocationEntry.cc * src/a2io.h * src/SelectEventPoll.h * src/option_processing.cc * src/prefs.h * src/EpollEventPoll.cc * src/EventPoll.h * src/SocketCore.h * src/Makefile.am * src/main.cc * src/DownloadEngine.h * src/SelectEventPoll.cc * src/DownloadEngine.cc * src/SocketCore.cc * src/DownloadEngineFactory.cc * src/Makefile.in * src/prefs.cc * src/usage_text.h
* 2008-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2008-11-131-1/+5
| | | | | | | | | | | | | | | | | Fixed compile error without SSL/XML library. * src/DefaultBtProgressInfoFile.cc * src/DefaultBtProgressInfoFile.h * src/FileMetalinkParserState.cc * src/RequestGroup.h * src/SocketCore.cc * src/SocketCore.h * src/VerificationMetalinkParserState.cc * src/download_helper.h * src/main.cc * test/DefaultBtProgressInfoFileTest.cc * test/DownloadHelperTest.cc
* 2008-11-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2008-11-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Added the ability to verify peer in SSL/TLS using given CA certificates. The CA certificates are specified in --ca-certificate option. By default, the verification is disabled. Use --check-certificate option to enable it. * src/HttpRequestCommand.cc * src/LibgnutlsTLSContext.cc * src/LibgnutlsTLSContext.h * src/LibsslTLSContext.cc * src/LibsslTLSContext.h * src/MultiUrlRequestInfo.cc * src/OptionHandlerFactory.cc * src/SocketCore.cc * src/SocketCore.h * src/a2functional.h * src/message.h * src/option_processing.cc * src/prefs.cc * src/prefs.h * src/usage_text.h
* 2008-11-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2008-11-081-2/+9
| | | | | | | | | | | | | | | | | Introduced TLSContext that holds TLS related data that can be shared with multiple SSL connections. * src/DownloadEngineFactory.cc * src/LibgnutlsTLSContext.cc * src/LibgnutlsTLSContext.h * src/LibsslTLSContext.cc * src/LibsslTLSContext.h * src/Makefile.am * src/SocketCore.cc * src/SocketCore.h * src/TLSContext.h * src/message.h
* 2008-10-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-10-051-4/+6
| | | | | | | | | | | | | | | | | | | Made socket for dht connections non-blocking * src/DHTAbstractMessage.cc * src/DHTAbstractMessage.h * src/DHTConnection.h * src/DHTConnectionImpl.cc * src/DHTConnectionImpl.h * src/DHTMessage.h * src/DHTMessageDispatcherImpl.cc * src/DHTMessageDispatcherImpl.h * src/DHTUnknownMessage.cc * src/DHTUnknownMessage.h * src/SocketCore.cc * src/SocketCore.h * test/MockDHTMessage.h
* 2008-09-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-09-301-7/+10
| | | | | | | | | | | | | | Fixed compile error with debian mingw32 cross compiler(4.2.1). The configuration is minimum: no torrent, no metalink, so there may be other compile error on their code. * src/a2netcompat.h * src/File.cc * src/File.h * src/SocketCore.cc * src/SocketCore.h
* 2008-09-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-09-271-7/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | Fixed the bug that HTTPS download fails. * src/AbstractCommand.cc * src/AbstractCommand.h * src/DownloadCommand.cc * src/FtpConnection.cc * src/HttpConnection.cc * src/HttpRequestCommand.cc * src/HttpResponseCommand.cc * src/HttpSkipResponseCommand.cc * src/MSEHandshake.cc * src/PeerConnection.cc * src/SocketCore.cc * src/SocketCore.h Fixed the bug that aria2 doesn't download whole content body and cannot reuse connection if chunked transfer encoding and gzip content encoding are set. * src/DownloadCommand.cc * src/HttpSkipResponseCommand.cc
* 2008-09-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-09-141-0/+2
| | | | | | | | Added the function to get error message from socket. * src/SocketCore.cc * src/SocketCore.h
* 2008-09-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-09-131-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use non-blocking socket for TCP communication to avoid possible blocking due to buffer full. * src/AbstractProxyRequestCommand.cc * src/FtpConnection.cc * src/FtpConnection.h * src/FtpNegotiationCommand.cc * src/FtpNegotiationCommand.h * src/HttpConnection.cc * src/HttpConnection.h * src/HttpRequestCommand.cc * src/InitiatorMSEHandshakeCommand.cc * src/InitiatorMSEHandshakeCommand.h * src/MSEHandshake.cc * src/MSEHandshake.h * src/Makefile.am * src/PeerConnection.cc * src/PeerConnection.h * src/PeerInteractionCommand.cc * src/PeerListenCommand.cc * src/ReceiverMSEHandshakeCommand.cc * src/ReceiverMSEHandshakeCommand.h * src/SocketBuffer.cc * src/SocketBuffer.h * src/SocketCore.cc * src/SocketCore.h