aboutsummaryrefslogtreecommitdiff
path: root/src/connection.cpp
AgeCommit message (Collapse)Author
2015-02-16[Patch 2/4] Network rework: packet writing, sending and cleanupsLoic Blot
NetworkPacket.cpp: * Remove some deprecated functions, we must use streaming interface * m_data converted from u8* to std::vector<u8> * Add an exporter to forge packet to Connection object * implement operator << std::wstring. n * implement operator << std::string * dynamic resize when write packet content. * fix string writing and performances. * create ServerCommandFactory, used by client to get useful informations about packet processing (sending). * Reliability * Transmit channel * Implement putRawString for some ugly char (_INIT packet), and use it. * Many packet read and write migrated * Implement oldForgePacket to interface writing with current connection * fix U8/char/bool writing * fix string writing and performances. * add some missing functions * Use v3s16 read instead of reading x,y,z separately * Add irr::video::SColor support into packets * Add some missing handlers * Add a template function to increase offset * Throw a serialization error on packet reading (must be improved) PacketFactories: * Create ServerCommandFactory, used by client to get useful informations about packet processing (sending). * Create ClientCommandFactory, used by server to get useful informations about packet processing (sending). Client.cpp: * implement NetworkPacket ::Send interface. * Move packet handlers to a dedicated file * Remove Client::Send(SharedBuffer) Server.cpp: * implement NetworkPacket ::Send interface. * Rewrite all packets using NetworkPacket * Move packet handlers to a dedicated file * Remove Server::Send(SharedBuffer) ClientIface.cpp: * Remove sendToAll(SharedBuffer<u8>) Connection.hpp rework: * Remove duplicate include * Remove duplicate negation * Remove a useless variable * Improve code performance by using a m_peers_list instead of scanning m_peers map * Remove Connection::Send(SharedBuffer) * Fix useafterfree into NetworkPacket Sending * Remove unused Connection::sendToAll Test.cpp: * Remove dead code * Update tests to use NetworkPackets Misc: * add new wrappers to Send packets in client, using NetworkPacket * Add NetworkPacket methods for Connection * coding style fix * dead code since changes cleanup * Use v3s16 read instead of reading x,y,z separately in some packets * Use different files to handle packets received by client and server * Cleanup: Remove useless includes ok @Zeno- Tested by @Zeno- @VanessaE and @nerzhul on running servers
2015-01-18Fix all warnings and remove -Wno-unused-but-set cflagkwolekr
2015-01-13Performance fixes.onkrot
2014-12-29Fix -Wtype-limits warnings and remove disabling of -Wtype-limitsCraig Robbins
2014-12-28Fix MSVC compiler warning about passing this pointer in initializer listsapier
2014-12-12Use std::string::empty() instead of size() where applicableAnton
2014-10-28Fix #1733: An unhandled exception occurred: GetPeer: Peer not found ↵Craig Robbins
(possible timeout)
2014-09-06Log unhandled exceptions in connectionthreads to errorstreamsapier
2014-09-06Fix access to invalid data on reception of packet with size 0sapier
2014-08-22Improve timeout calculationsapier
gf
2014-07-06Fix errors/warnings reported by valgrindsfan5
2014-06-28Add prefixes to enum values and fix style issueskwolekr
2014-06-12Changed Time Out message from ERROR to INFO.Megaf
Changed Time Out message from ERROR to INFO.
2014-05-04Fix numeric underflow on calculating window size adjustmentsapier
2014-04-29Add download rate to media progress bar (non http mode only!)sapier
Minor coding style fixes
2014-04-19Reduce log level for incoming crap packetssapier
Add log entry for peer timeout
2014-04-19Bunch of small fixes (coding style, very unlikely errors, warning messages)sapier
2014-04-15Fix all warnings reported by clangSfan5
2014-04-09Add support for named threads (atm linux only)sapier
2014-04-08Cleanup client init states by bumping protocol versionsapier
Don't use TOSERVER_RECEIVED_MEDIA but TOSERVER_CLIENT_READY as indicatio for client ready Handle clients with protocol version < 23 (almost) same way as before Make client tell server about it's version Add client state to not send bogus player position updates prior init complete Add access to statistics information (peer connction time,rtt,version) Fix clients standing stalled in world while preloading item visuals (new clients only) Add get_player_information to read client specific information from lua
2014-03-12Pass arguments by referenceSelat
2014-02-05Add the option to bind to a specific addressShadowNinja
2014-01-31Add propper client initializationsapier
-add client states to avoid server sending data to uninitialized clients -don't show uninitialized clients to other players -propper client disconnect handling Minor comment fixes in server Minor bugfixes in connection -improved peer id calculation -honor NDEBUG flag -improved disconnect handling -increased initial send window Remove some dead code
2014-01-26Fix bug only half of unreliable queue handled per step in worst casesapier
2014-01-21Connection: Stop processing malformed packet when encounteredkwolekr
2014-01-10Fixed minetest reliable udp implementation (compatible to old clients)sapier
2014-01-10Make MutexQueue use jsemaphore for signalingsapier
2013-12-15Replace SimpleThread by JThread now implementing same featuressapier
2013-08-04Fix server getting completely choked up on even a little of DoSPerttu Ahola
* If client count is unbearable, immediately delete denied clients * Re-prioritize the checking order of things about incoming clients * Remove a huge CPU-wasting exception in ReliablePacketBuffer
2013-07-04Throw exception instead of assert on nested reliable packetsKahrl
Fixes a denial of service vulnerability, issue #784
2013-06-23Add support for IPv6proller
Two new configuration options are added: - "enable_ipv6" to enable/disable the overall use of IPv6 - "ipv6_server" to enable/disable the use of IPv6 sockets when running a server (when "enable_ipv6" is enabled)
2013-03-11Migrate to STL containers/algorithms.Ilya Zhuravlev
2013-02-24Update Copyright YearsSfan5
2013-02-24Change Minetest-c55 to MinetestPilzAdam
2012-11-29Add congestion control settings to minetest.confPerttu Ahola
2012-06-17Properly and efficiently use split utility headersPerttu Ahola
2012-06-05Switch the license to be LGPLv2/later, with small parts still remaining as ↵Perttu Ahola
GPLv2/later, by agreement of major contributors
2012-06-04Remove misdesigned exception from ReliablePacketBufferPerttu Ahola
2012-03-20Attempt to fix some minor memory leaksPerttu Ahola
2012-03-18Attempt to fix build for MSVCPerttu Ahola
2012-03-11Proper handling of failing to bind server socketPerttu Ahola
2012-03-11Increase Peer max_packets_per_second (hopefully doesn't break anything)Perttu Ahola
2012-01-12The huge item definition and item namespace unification patch (itemdef), see ↵Kahrl
http://c55.me/minetest/wiki/doku.php?id=changes:itemdef
2011-11-07Make Connection::Receive return the data via a SharedBuffer reference, so ↵Kahrl
the caller doesn't have to choose the right buffer size in advance. Conflicts: src/test.cpp
2011-10-30Attempt a workaround to the network layer segfaultPerttu Ahola
2011-10-21Make it to compile on MSVC20100.3.dev-20111021Perttu Ahola
2011-10-21Some tuning in m_max_packets_per_second algorithmPerttu Ahola
2011-10-20Improve Connection with threading and some kind of congestion controlPerttu Ahola
2011-10-18Better handling of SendFailedException in ConnectionPerttu Ahola
2011-10-17Catch SendFailedException when replying back in Connection::Receive()Perttu Ahola