aboutsummaryrefslogtreecommitdiff
path: root/src/clientiface.h
AgeCommit message (Collapse)Author
2023-03-05Reduce server CPU consumed by occlusion culling. (#13260)lhofhansl
Cache blocks already occluded at a specific distance. The RemoteClient typically visits the same distance multiple time - especially at larger distances, so this saves significant CPU from recalculating the occlusion state of blocks.
2023-03-03Log server map send cycle time. (#13259)lhofhansl
* Measure server map send time per player.
2023-02-27Add minetest.get_player_window_information() (#12367)rubenwardy
2022-11-09Fix typos and en_US/en_GB inconsistency in various files (#12902)Abdou-31
2022-04-28Fix password changing getting stuck if wrong password is entered oncesfan5
2022-04-08Spacing fixesShadowNinja
2022-02-03Clean up ClientInterface lockingJude Melton-Houghton
2021-10-12Remove a few unused functions reported by callcatcher (#11658)SmallJoker
2021-05-06Fix build for newer versions of GCC (#11246)lhofhansl
2021-01-31Cache client IP in RemoteClient so it can always be retrieved (#10887)sfan5
specifically: after the peer has already disappeared
2020-10-27Avoid resending near blocks unnecessarily.Lars
2020-10-13Rely on max_simultaneous_block_sends_per_client to limit blocks sent to the ↵Lars
client.
2020-04-25Add server side translations capability (#9733)EvidenceB Kidscode
* Add server side translations capability
2019-12-20Fix the player information version_string return value (#8616)Lejo
* Give more player information * Correct lua_api.txt * Correct keys in lua_api.txt * Improve Code * Only Bugfix+ser_vers * Correct doc * Fix double
2019-08-17ClientInterface: Use recursive mutex to prevent freeze in on_newplayer() (#8808)SmallJoker
2018-08-16Check node updates whether the blocks are known (#7568)SmallJoker
* Remove unused ignore_id
2018-03-09Drop less performant Server::setBlockNotSent for ↵Loic Blot
ClientInterface::markBlockposAsNotSent
2017-10-15Cache server config settings. (#6530)lhofhansl
* Cache server config settings.
2017-09-27Fix some forgotten u16 -> session_t in ad7daf7b52348e1b71aa803be10de5b2134cba11Loic Blot
2017-09-27Add session_t typedef + remove unused functions (#6470)Loïc Blot
* 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
2017-09-12Network: Remove large parts of deprecated legacy code (#6404)SmallJoker
Also remove the setting 'send_pre_v25_init' Keep old enum entries for obsolete commands
2017-09-09Server: Calculate maximal total block sends dynamically (#6393)SmallJoker
The block sends per client is 1/2 when reaching the maximal player count.
2017-08-24Network cleanup (#6302)Loïc Blot
* 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
2017-08-17C++ modernize: Pragma once (#6264)Loïc Blot
* Migrate cpp headers to pragma once
2017-08-17l_server, clientenvironment, clientiface: code modernizationLoic Blot
* use range-based for loops * use refs on some exceptions & one setter
2017-08-16ClientInterface: add a function to verify (correctly) if user limit was ↵Loïc Blot
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)
2017-08-16Cleanup various headers to reduce compilation times (#6255)Loïc Blot
* Cleanup various headers to reduce compilation times
2017-07-16Chat protocol rewrite (#5117)Loïc Blot
* 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
2017-06-16C++11 patchset 9: move hardcoded init parameters to class definitions (part ↵Loïc Blot
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
2017-06-06Use C++11 mutexes only (remove compat code) (#5922)Loïc Blot
* Fix event LINT & remove default constructor/destructors * remove compat code & modernize autolock header
2017-06-04C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821)Loïc Blot
2017-05-26Time: Change old `u32` timestamps to 64-bit (#5818)SmallJoker
MacOSX build fix + cleanups
2017-05-20Various code cleanup & little performance improvement on HTTP download (#5772)Loïc Blot
* Disable or remove unused enum members/functions * Tiny code style fixes * Make some functions const * Replace ClientMediaDownloader std::unordered_map with std::map
2017-04-28Clean up getTime helpersShadowNinja
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.
2017-04-20Fix various copy instead of const ref reported by cppcheck (part 3) (#5616)Loïc Blot
* Also remove 2 non declared but defined functions * Make some functions around const ref changes const
2017-04-14ClientIface::sendToAll: honor packet configuration (#5590)Loïc Blot
2017-02-18Use the `ARRLEN` macro in more places and remove an unused macro. (#5260)red-001
2016-10-08Optimize ClientIface::getPlayerNames(): return const ref instead a copy of ↵Loic Blot
all names
2016-10-05Replace various std::map with UNORDERED_MAP + various cleanupsLoic Blot
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
2016-03-12Resend blocks when modified while sending to clientJeija
2016-02-16Clientiface: remove "value is dummy" from docsest31
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.
2015-08-31Make ClientInterface::statenames consistent with the state enum againest31
Fixes minetest.get_player_information segfault due to out of bounds access problems, when compiled as debug build.
2015-08-23Clean up threadingShadowNinja
* 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.
2015-07-21Ask auth handler to create auth when a default password is setest31
-> 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
2015-05-24Small clientiface ASCII art improvementsest31
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).
2015-05-16Fix build since last commitest31
Also rename method to better match what it does.
2015-05-16Finalize init packets and enable protocol v25est31
This enables srp.
2015-05-11Make early protocol auth mechanism generic, and add SRPest31
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.
2015-03-13Replace NetworkPacket pointers to referencesLoic Blot
2015-03-13Prepare Protocol v25 init & authentication.Loic Blot
* 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