aboutsummaryrefslogtreecommitdiff
path: root/src/clientiface.h
Commit message (Collapse)AuthorAge
* Avoid resending near blocks unnecessarily.Lars2020-10-27
|
* Rely on max_simultaneous_block_sends_per_client to limit blocks sent to the ↵Lars2020-10-13
| | | | client.
* Add server side translations capability (#9733)EvidenceB Kidscode2020-04-25
| | | | * Add server side translations capability
* Fix the player information version_string return value (#8616)Lejo2019-12-20
| | | | | | | | | | | | | | | | * Give more player information * Correct lua_api.txt * Correct keys in lua_api.txt * Improve Code * Only Bugfix+ser_vers * Correct doc * Fix double
* ClientInterface: Use recursive mutex to prevent freeze in on_newplayer() (#8808)SmallJoker2019-08-17
|
* Check node updates whether the blocks are known (#7568)SmallJoker2018-08-16
| | | * Remove unused ignore_id
* Drop less performant Server::setBlockNotSent for ↵Loic Blot2018-03-09
| | | | ClientInterface::markBlockposAsNotSent
* Cache server config settings. (#6530)lhofhansl2017-10-15
| | | | * Cache server config settings.
* Fix some forgotten u16 -> session_t in ad7daf7b52348e1b71aa803be10de5b2134cba11Loic Blot2017-09-27
|
* Add session_t typedef + remove unused functions (#6470)Loïc Blot2017-09-27
| | | | | | * Add session_t typedef + remove unused functions u16 peer_id is used everywhere, to be more consistent and permit some evolutions on this type in the future (i'm working on a PoC), uniformize u16 peer_id to SessionId peer_id
* Network: Remove large parts of deprecated legacy code (#6404)SmallJoker2017-09-12
| | | | Also remove the setting 'send_pre_v25_init' Keep old enum entries for obsolete commands
* Server: Calculate maximal total block sends dynamically (#6393)SmallJoker2017-09-09
| | | The block sends per client is 1/2 when reaching the maximal player count.
* Network cleanup (#6302)Loïc Blot2017-08-24
| | | | | | | | | | | | | | | | | | | | | | | * Cleanup network headers * Move peerhandler to a specific header to reduce compilation times * Move socket.cpp/h to network folder * More work * Network code cleanups * Move socket.{cpp,h} to network folder * Move Address object to network/address.{cpp,h} * Move network exceptions to network/networkexceptions.h * Client: use unique_ptr for Connection * Server/ClientIface: use shared_ptr for Connection * Format fixes * Remove socket.cpp socket.h from clang-format whitelist * Also fix NetworkPacket code style & make it under clang-format
* C++ modernize: Pragma once (#6264)Loïc Blot2017-08-17
| | | | * Migrate cpp headers to pragma once
* l_server, clientenvironment, clientiface: code modernizationLoic Blot2017-08-17
| | | | | * use range-based for loops * use refs on some exceptions & one setter
* ClientInterface: add a function to verify (correctly) if user limit was ↵Loïc Blot2017-08-16
| | | | | | | | | | | | | | reached (#6258) * ClientInterface: add a function to verify (correctly) if user limit was reached CS_HelloSent is a better indicator of active slots than CS_Created, which are session objects created after init packet reception Switch existing checks to ClientInterface::isUserLimitReached() Use range-based for loop for getClientIds() used function too This will fix #6254 (not the memory overhead if init is flooded)
* Cleanup various headers to reduce compilation times (#6255)Loïc Blot2017-08-16
| | | | * Cleanup various headers to reduce compilation times
* Chat protocol rewrite (#5117)Loïc Blot2017-07-16
| | | | | | | | | | | | | * New TOCLIENT_CHAT_MESSAGE packet * Rename old packet to TOCLIENT_CHAT_MESSAGE_OLD for compat * Handle TOCLIENT_CHAT_MESSAGE new structure client side * Client chat queue should use a specific object * SendChatMessage: use the right packet depending on protocol version (not complete yet) * Add chatmessage(type) objects and handle them client side (partially) * Use ChatMessage instead of std::wstring server side * Update with timestamp support
* C++11 patchset 9: move hardcoded init parameters to class definitions (part ↵Loïc Blot2017-06-16
| | | | | | | | | | | | | | | | | | | | | | | | 1) (#5984) * C++11 patchset 9: move hardcoded init parameters to class definitions C++11 introduced the possibility to define the default values directly in class definitions, do it on current code Also remove some unused attributes * CollisionInfo::bouncy * collisionMoveResult::collides_xy * collisionMoveResult::standing_on_unloaded * Clouds::speed * More constructor cleanups + some variables removal * remove only write guiFormSpecMenu::m_old_tooltip * move header included inside defintions in genericobject.h * remove some unused since years exception classes * remove unused & empty debug_stacks_init * remove unused & empty content_nodemeta_serialize_legacy * remove forgotten useless bool (bouncy) in collision.cpp code
* Use C++11 mutexes only (remove compat code) (#5922)Loïc Blot2017-06-06
| | | | * Fix event LINT & remove default constructor/destructors * remove compat code & modernize autolock header
* C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821)Loïc Blot2017-06-04
|
* Time: Change old `u32` timestamps to 64-bit (#5818)SmallJoker2017-05-26
| | | | MacOSX build fix + cleanups
* Various code cleanup & little performance improvement on HTTP download (#5772)Loïc Blot2017-05-20
| | | | | | * Disable or remove unused enum members/functions * Tiny code style fixes * Make some functions const * Replace ClientMediaDownloader std::unordered_map with std::map
* Clean up getTime helpersShadowNinja2017-04-28
| | | | | | This increases size of the getTime return values to 64 bits. It also removes the TimeGetter classes since the getTime functions are now very precise.
* Fix various copy instead of const ref reported by cppcheck (part 3) (#5616)Loïc Blot2017-04-20
| | | | * Also remove 2 non declared but defined functions * Make some functions around const ref changes const
* ClientIface::sendToAll: honor packet configuration (#5590)Loïc Blot2017-04-14
|
* Use the `ARRLEN` macro in more places and remove an unused macro. (#5260)red-0012017-02-18
|
* Optimize ClientIface::getPlayerNames(): return const ref instead a copy of ↵Loic Blot2016-10-08
| | | | all names
* Replace various std::map with UNORDERED_MAP + various cleanupsLoic Blot2016-10-05
| | | | | | | | | | | | This is part 2 for 5f084cd98d7b3326b51320455364337539710efd Other improvements: * Use the defined ItemGroupList when used * make Client::checkPrivilege const * inline some trivial functions * Add ActiveObjectMap typedef * Add SettingsEntries typedef
* Resend blocks when modified while sending to clientJeija2016-03-12
|
* Clientiface: remove "value is dummy" from docsest312016-02-16
| | | | | | | | | | Commit 6a1670dbc31cc0e44178bbd9ad34ff0d5981a060 "Migrate to STL containers/algorithms." has replaced core::map<T, bool> with std::set<T>, but didn't update the accompanying comment saying "value is dummy". This happened at two places.
* Make ClientInterface::statenames consistent with the state enum againest312015-08-31
| | | | | Fixes minetest.get_player_information segfault due to out of bounds access problems, when compiled as debug build.
* Clean up threadingShadowNinja2015-08-23
| | | | | | | | | | | | | | | | | | | | * Rename everything. * Strip J prefix. * Change UpperCamelCase functions to lowerCamelCase. * Remove global (!) semaphore count mutex on OSX. * Remove semaphore count getter (unused, unsafe, depended on internal API functions on Windows, and used a hack on OSX). * Add `Atomic<type>`. * Make `Thread` handle thread names. * Add support for C++11 multi-threading. * Combine pthread and win32 sources. * Remove `ThreadStarted` (unused, unneeded). * Move some includes from the headers to the sources. * Move all of `Event` into its header (allows inlining with no new includes). * Make `Event` use `Semaphore` (except on Windows). * Move some porting functions into `Thread`. * Integrate logging with `Thread`. * Add threading test.
* Ask auth handler to create auth when a default password is setest312015-07-21
| | | | | -> Fix server crash with protocol >=25 if a default password is set. -> Remove some useless and possibly confusion causing code for the TOCLIENT_FIRST_SRP packet handler
* Small clientiface ASCII art improvementsest312015-05-24
| | | | | | Use v arrows except where there is only one line between two boxes, and other improvements (Yea could use ↓ but its an ASCII art not an Unicode art).
* Fix build since last commitest312015-05-16
| | | | Also rename method to better match what it does.
* Finalize init packets and enable protocol v25est312015-05-16
| | | | This enables srp.
* Make early protocol auth mechanism generic, and add SRPest312015-05-11
| | | | | | | Adds everything needed for SRP (and everything works too), but still deactivated, as protocol v25 init packets aren't final yet. Can be activated by changing the LATEST_PROTOCOL_VERSION header to 25 inside networkprotocol.h.
* Replace NetworkPacket pointers to referencesLoic Blot2015-03-13
|
* Prepare Protocol v25 init & authentication.Loic Blot2015-03-13
| | | | | | | | | | * TOSERVER_INIT and TOCLIENT_INIT renamed to _LEGACY * TOSERVER_PASSWORD merged from dev-0.5, can use protocol v24 and v25 * TOCLIENT_ACCESS_DENIED merged from dev-0.5, can use protocol v24 and v25, with normalized strings an a custom id for custom errors * new TOSERVER_INIT packet only send MT version, supported compressions, protocols and serialization, this permit to rework everything later without break the _INIT packet * new TOSERVER_AUTH packet which auth the client * new TOCLIENT_HELLO packet which send server serialization version atm * new TOCLIENT_AUTH_ACCEPTED which is send when TOCLIENT_AUTH was okay. After this packet, the client load datas from servers, like after TOCLIENT_INIT_LEGACY packet
* For usages of assert() that are meant to persist in Release builds (when ↵Craig Robbins2015-03-07
| | | | NDEBUG is defined), replace those usages with persistent alternatives
* ClientInterface::getClientIDs doesn't need a std::list. Use a std::vector ↵Loic Blot2015-03-04
| | | | for better perfs
* [Patch 2/4] Network rework: packet writing, sending and cleanupsLoic Blot2015-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix "ghost" blocks if block update is "on wire" while player digs nodessapier2014-08-22
|
* Add prefixes to enum values and fix style issueskwolekr2014-06-28
|
* Fix macro ARRAYSIZE name collision on windowssapier2014-04-20
|
* Fix all warnings reported by clangSfan52014-04-15
|
* Fix MSVC buildBlockMen2014-04-12
|
* Cleanup client init states by bumping protocol versionsapier2014-04-08
| | | | | | | | | | 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
* Add propper client initializationsapier2014-01-31
-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