summaryrefslogtreecommitdiff
path: root/test/SocketCoreTest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Fix various typosluzpaz2024-01-141-1/+1
| | | | Found via `codespell -q 3 -S "./deps,./ChangeLog.old,./LICENSE.OpenSSL,./doc/manual-src/pt,./doc/sphinx_themes/sphinx_rtd_theme/locale" -L ans,anull,clen,dependant,filetest,fo,hel,nd,orign,padd,parm,servent,tennant,worl,windows`
* Refactor SocketCore::getPeerInfo, getAddrInfo to return Endpoint objectTatsuhiro Tsujikawa2016-01-091-8/+12
|
* make clang-format using clang-format-3.6Tatsuhiro Tsujikawa2015-12-271-38/+37
|
* Convert most 0/NULL pointers to nullptrNils Maier2013-08-201-2/+2
| | | | Courtesy of llvm cpp11-migrate 3.3
* Remove auto_delete in favor of std::unique_ptrTatsuhiro Tsujikawa2013-06-221-2/+4
|
* Code cleanupTatsuhiro Tsujikawa2012-05-161-5/+5
|
* Removed dependency on inet_atonTatsuhiro Tsujikawa2012-05-141-0/+25
| | | | | | | Implemented inetPton as a replacement of inet_aton. inetPton is implemented using net::getBinAddr. This change fixes bug#3525424.
* Compare IPAddress in commonName as string.Tatsuhiro Tsujikawa2012-04-011-0/+86
| | | | Added test for net::verifyHostname().
* Rewritten util::inSameCidrBlock() to support IPv6 address.Tatsuhiro Tsujikawa2011-10-191-0/+19
| | | | We also introduced union sockaddr_union in a2netcompat.h.
* Added test for inetNtop()Tatsuhiro Tsujikawa2011-10-181-1/+36
|
* 2008-11-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2008-11-261-0/+10
| | | | | | | | | | | | | Applied aria2-1.0.1-mingw.patch. Use SOCKET_ERRNO instead of errno if the code is used both linux and mingw. Collected 4th and 5th argument types for getsockopt and setsockopt. * src/SocketCore.cc * src/a2netcompat.h * test/SocketCoreTest.cc
* 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-04-271-3/+2
| | | | | | | | | | | | | Rewritten Exception class. Throw exception object, not its pointer and catch by reference, so that remove problematic delete operator for catched exception. * src/Exception.cc * src/Exception.h * test/ExceptionTest.cc * src/*: All files throwing/catching exception. * test/*: All files throwing/catching exception.
* 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-03-091-1/+1
| | | | | | type cleanup for allmost all remaining files.
* 2008-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-03-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Included missing iostream. * test/AllTest.cc * test/BtDependencyTest.cc * test/BtExtendedMessageTest.cc * test/DHTConnectionImplTest.cc * test/DHTMessageFactoryImplTest.cc * test/DHTMessageTrackerEntryTest.cc * test/DHTNodeTest.cc * test/DHTRoutingTableSerializerTest.cc * test/DefaultBtAnnounceTest.cc * test/DefaultBtContextTest.cc * test/DefaultBtMessageFactoryTest.cc * test/DefaultExtensionMessageFactoryTest.cc * test/HandshakeExtensionMessageTest.cc * test/HttpResponseTest.cc * test/MetalinkProcessorTest.cc * test/MultiFileAllocationIteratorTest.cc * test/SocketCoreTest.cc * test/UTPexExtensionMessageTest.cc
* 2008-02-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IPv6 support for SocketCore class. TODO: In SocketCore::establishConnection(), this is insufficient to determin the failure of connect() here because the socket is non-blocking state. The next addresses should be tried after select(). TODO: NameResolver still uses c-ares(<= 1.4) ares_gethostbyname(). If c-ares 1.5 or newer is installed, ares_getaddrinfo() should be used instead which address family independent. TODO: DHTRoutingTable{Deserializer,Serializer} currently saves peer information in a compact peer format which is for IPv4 only. Some BitTorrent functions in PeerMessageUtil still depends on IPv4 but this is a spec of BitTorrent protocol. * src/SocketCore.{h, cc} * src/PeerMessageUtil.cc * test/SocketCoreTest.cc * test/PeerMessageUtilTest.cc * test/DHTConnectionImplTest.cc Handle IPv4-mapped addresses. * src/DHTNode.cc: Now identity is determined by node id. * src/DHTMessageTrackerEntry.cc Because now PeerMessageUtil::unpackcompact() could fail, the caller should handle it. * src/DHTRoutingTableDeserializer.cc * src/DHTMessageFactoryImpl.cc
* 2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-02-081-8/+12
| | | | | | | | | Removed "using namespace std;" from all sources. Appended std:: prefix to c++ standard classes. Included string.h where mem* function are used.
* 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-02-021-1/+2
| | | | | | | | | | | Commented out ip address comparison because a host can have multiple ip addresses and it is hard to predict the hostname is resolved into which one. * test/SocketCoreTest.cc (testWriteAndReadDatagram)
* 2008-02-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-02-011-0/+57
Added DHT functionality, compatible with mainline. DHT is disabled by default. To enable it, give --enable-dht to aria2c. You may need to specify entry point to DHT network using --dht-entry-point. DHT uses UDP port to listen incoming message. Use --dht-listen-port to specify port number. Make sure that your firewall configuration can pass through UDP traffic to the port. The routing table is saved in $HOME/.aria2/dht.dat. * src/DHT* * src/BNode.{h, cc} * src/PeerInteractionCommand.cc: enable DHT functionality for a particular torrent. * src/Data.cc: Rewritten ctor. * src/OptionHandlerFactory.cc: Added --enable-dht, --dht-listen-port, --dht-entry-point. * src/DefaultBtInteractive.cc: Send port message if dht is enabled. * src/RequestGroup.cc: Initialize DHT functionality. When download ends, remove BtContext from DHTPeerAnnounceStorage. * src/BtPortMessage.{h, cc}: Rewritten. * src/message.h * src/OptionHandlerImpl.cc * src/option_processing.cc: Added --enable-dht, --dht-listen-port, --dht-entry-point. * src/Dictionary.{h, cc} (remove): New function. * src/prefs.h * src/DefaultBtMessageFactory.h * src/BtHandshakeMessage.cc * src/ActivePeerConnectionCommand.cc * src/SocketCore.{h, cc}: Added datagram socket support. * src/DefaultBtMessageFactory.cc * src/BtSetup.cc: Add BtContext to DHTPeerAnnounceStorage here. Create DHT commands. * src/BtMessageFactory.h * src/PeerMessageUtil.{h, cc}