summaryrefslogtreecommitdiff
path: root/src/SocketCore.h
Commit message (Collapse)AuthorAgeFilesLines
* fix notificationHanjie Wu2023-12-181-1/+1
|
* fix notification issueHanjie Wu2023-12-181-1/+1
|
* add uTP support for outbound connectionsHanjie Wu2023-12-161-10/+57
|
* spelling fixesklemens2017-03-201-2/+2
|
* WinTLS: Fix hang because of buffered received dataTatsuhiro Tsujikawa2016-01-301-0/+5
| | | | | | | | | | | | | WinTLSSession buffers received decrypted data into its own buffer. If read is requested, it copies the data from its buffer. But if requested buffer size is less than decrypted buffer, some of the data is left in the buffer. Previously, we had no facility to check the existence of this pending data. If this data is the last requested data from remote server, we may end up waiting for read event even if we have already data in our buffer, which may cause hang. This commit fixes this issue by introducing function to return the buffered length in TLSSession. SocketCore also provides the same function, which delegates to TLSSession object.
* Refactor SocketCore::getPeerInfo, getAddrInfo to return Endpoint objectTatsuhiro Tsujikawa2016-01-091-13/+6
|
* Define SockAddr and use it instead of raw std::pairTatsuhiro Tsujikawa2016-01-091-17/+11
|
* make clang-format using clang-format-3.6Tatsuhiro Tsujikawa2015-12-271-37/+34
|
* Add --socket-recv-buffer-size optionTatsuhiro Tsujikawa2015-11-281-0/+5
| | | | | | | | Set the maximum socket receive buffer in bytes. Specifing 0 will disable this option. This value will be set to socket file descriptor using SO_RCVBUF socket option with setsockopt() call. See GH-487 about the usecase of this option
* Use std::make_sharedTatsuhiro Tsujikawa2015-06-111-1/+5
|
* Add --ssh-host-key-md optionTatsuhiro Tsujikawa2015-05-161-1/+1
| | | | | | | | | Set checksum for SSH host public key. Use same syntax with --checksum option. TYPE is hash type. The supported hash type is sha-1 or md5. DIGEST is hex digest. For example: sha-1=b030503d4de4539dc7885e6f0f5e256704edf4c3. This option can be used to validate server's public key when SFTP is used. If this option is not set, which is default, no validation takes place.
* sftp: Seek to the correct position to resume, fix slow start of transferTatsuhiro Tsujikawa2015-05-121-0/+2
|
* sftp: basic download worksTatsuhiro Tsujikawa2015-05-121-0/+9
| | | | | | This commits implements basic downloading feature for sftp URI. This includes segmented downloads, and connection (sftp session) pooling. Download via HTTP proxy has not been implemented yet.
* Add basic ssh/sftp code to SocketCore and introduce SSHSessionTatsuhiro Tsujikawa2015-05-101-0/+17
| | | | | | | | | | We use libssh2 to implement sftp feature. SSHSession is closely designed to TLSSession, but it differs in several aspects. In this code, we only implements read part of sftp, since aria2 won't offer uploading feature. Adding SSH/sftp to SocketCore is a bit bloat. But by doing this we can reuse DownloadCommand, without mostly no modification. We can just create SSHDownloadCommand by inheriting it, just like existing ftp.
* multiple interface support for link aggregationSarim Khan2015-04-211-0/+3
| | | | fix: wrong variable
* Fixed some typos in code commentsDan Fandrich2015-01-161-1/+1
|
* Minor DSCP-related improvementsAlexander Amanuel2014-01-291-1/+2
| | | | | - Improved usage annotation - Shifted DSCP value to set not whole DS field, but only it's DSCP part
* Refactored DSCP-related code a bitAlexander Amanuel2014-01-281-1/+6
|
* Added DSCP supportAlexander Amanuel2014-01-281-0/+3
|
* Require -std=c++11 and use std::shared_ptr instead of SharedHandleTatsuhiro Tsujikawa2013-06-221-7/+7
|
* 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