summaryrefslogtreecommitdiff
path: root/src/server.h
Commit message (Collapse)AuthorAge
* Fix a little regression on SendActiveObjectMessages which send all ↵Loic Blot2015-03-17
| | | | TOCLIENT_ACTIVE_OBJECT_MESSAGES as reliable
* Move TOCLIENT_ACTIVE_OBJECT_REMOVE_ADD and TOCLIENT_ACTIVE_OBJECT_MESSAGES ↵Loic Blot2015-03-16
| | | | to private functions
* 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
* Rename some packet and handlers to <packet>_Legacy name for compat layer ↵Loic Blot2015-03-13
| | | | between new network changes and old network clients
* Server.cpp Use std::list instead of std::vector for playSound, ↵Loic Blot2015-03-05
| | | | fillMediaCache, sendRequestedMedia, sendMediaAnnouncement and related functions
* Server::AsyncRunStep: buffered_messages now uses std::vector instead of ↵Loic Blot2015-03-05
| | | | std::list. * sendRemoveNode and sendAddNodes are also converted as a side effect
* Performance improvement: Use std::list instead of std::vector for ↵Loic Blot2015-03-05
| | | | | | request_media, Server::getModNames, Environment::m_simple_objects. * Also remove unused Server::m_modspaths
* Remove Queue class which uses std::list and use native std::queueLoic Blot2015-03-05
|
* We always know playerSAO when calling SendInventory. Using it instead of ↵Loic Blot2015-03-04
| | | | searching it via peer_id
* Send Position packet on event, don't check it at each AsyncRunStep.Loic Blot2015-03-04
| | | | * This permit to cleanup the player checking loop
* Send Inventory packet on event, don't check it at each AsyncRunStep.Loic Blot2015-03-04
| | | | | | * Call UpdateCrafting into SendInventory because this functions is only called before SendInventory * Use Player* instead of peer_id for UpdateCrafting because SendInventory already has the Player* pointer, then don't loop for searching Player* per peer_id * m_env_mutex don't need to be used with this modification because it's already locked before the calls
* Send Breath packet on event, don't check it at each AsyncRunStepLoic Blot2015-03-03
|
* Send Player HP when setHP (or a setHP caller) is called instead of looping ↵Loic Blot2015-03-03
| | | | and testing the state change.
* [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
* Network Layer 7 rework (Packet handling)Loic Blot2015-02-10
| | | | | | | | | | | | | | * Move networkcode to a dedicated directory * Rename clientserver.h to network/networkprotocol.h (Better name) and sanitize some includes * Create object NetworkPacket * It stores command (opcode) and data separated * It also stores peer_id * Data reading can be done by using a streaming interface * Change packet routing analysis * Remove old conditional analysis * Now uses function pointed analysis and add connection state ({Client,Server}::handlers) * Connection state permit to categorize condition to handle before analyze packets * Create a handler for depreciated messages, instead of duplicating code
* Send real port to server listShadowNinja2015-01-23
|
* Fix struct vs. class in forward declarationsKahrl2014-12-08
|
* Clean up rollbackShadowNinja2014-11-19
|
* Recalculate normals for cached meshes.RealBadAngel2014-10-21
| | | | | | Check if mesh is here before adding to meshcollector. Fix deleting the meshes.
* Add prefixes to enum values and fix style issueskwolekr2014-06-28
|
* Use integers instead of float valuesBlockMen2014-04-12
|
* Add player:set_eye_offset() by @MirceaKitsune and clean upBlockMen2014-04-12
|
* Add third person viewBlockMen2014-04-12
|
* Infer ipv6_server from bind_address; fix client connect to IN(6)ADDR_ANYKahrl2014-04-10
|
* 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
* Pass arguments by referenceSelat2014-03-12
|
* Remove "Server -!- " prefix from player messagesShadowNinja2014-02-27
|
* Add the option to bind to a specific addressShadowNinja2014-02-05
|
* Add minetest.kick_player(name, reason)sapier2014-02-03
|
* Add player:override_day_night_ratio() for arbitrarily controlling sunlight ↵Perttu Ahola2014-02-01
| | | | brightness
* Add player:set_sky() with simple skybox supportPerttu Ahola2014-02-01
|
* 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
* Allow vertical axis particle rotation constraintkhonkhortisan2014-01-13
| | | | | | | Use tables for adding particles, deprecate former way. separate particles(pawner) definition, add default values, work with no arguments
* Fixed minetest reliable udp implementation (compatible to old clients)sapier2014-01-10
|
* Send long announce as POST, show OS in useragentproller2014-01-07
| | | | | Add lag reporting to masterserver (average dtime) StyledWriter -> FastWriter in masterserver announce
* Handle LuaErrors in Lua -> C++ calls on LuaJITShadowNinja2013-12-18
|
* Rewrite client media download and support hash-based remote downloadKahrl2013-12-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move most of the media-related code in client.cpp into a new class ClientMediaDownloader (clientmedia.cpp, clientmedia.h). Among other things, this class does the following things: - Download [remote_server][sha1] instead of [remote_server][name]. This is to support servers that provide the same file name with different contents. - Initially fetch [remote_server]index.mth. This file should follow the Minetest Hashset format (currently version 1) and contain a list of SHA1 hashes that exist on the server. - The list of needed SHA1s is uploaded (via HTTP POST) when index.mth is requested, so servers can optionally narrow down the list to the needs of the client. - If index.mth is missing (HTTP response code 404), we enter compat mode, fetching [remote_server][name] as before this commit. - remote_server can now contain multiple servers, separated by commas. The downloader code attempts to split requests between the different servers, as permitted by each server's index.mth. If one server claims to have a file but actually doesn't (or something fails), we ask a different server that also claims to have it. - As before, when none of the remote servers provide a particular file, we download it via the conventional method, i.e. using the minetest protocol: TOSERVER_REQUEST_MEDIA / TOCLIENT_MEDIA. - Bugfix: Every downloaded file's SHA1 is now verified against the SHA1 announced by the minetest server (before loading it and inserting it into the file cache). - Bugfix: Only send TOSERVER_RECEIVED_MEDIA when we actually have all media. This should fix #863.
* Add minetest.swap_nodeNovatux2013-11-30
|
* Masterserver updateproller2013-10-18
|
* Weather: Clean up getHeat/getHumidity somewhatkwolekr2013-09-16
|
* Make it compileSfan52013-09-09
|
* Add dummy and LevelDB database backendsIlya Zhuravlev2013-09-09
|
* Use player:set_hotbar_image() instead of hardcoded hotbar.pngPilzAdam2013-09-05
|
* Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl2013-08-14
|
* Fix server getting completely choked up on even a little of DoSPerttu Ahola2013-08-04
| | | | | | * 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
* Weather backward compatibilityproller2013-08-02
|
* Add set_breath and get_breath to lua API.RealBadAngel2013-07-20
|
* Add ObjectRef.hud_set_hotbar_itemcount and add TOCLIENT_HUD_SET_PARAMKahrl2013-05-26
|
* Move scriptapi to separate folder (by sapier)sapier2013-05-25
| | | | | | | | | | | On the lua side, notably minetest.env:<function>(<args>) should now be replaced by minetest.<function>(<args>). The old way is and will stay supported for a long time. Also: Update and clean up lua_api.txt (by celeron55) Move EnvRef to lua and remove add_rat and add_firefly (by kahrl) Add separate src/util/CMakeLists.txt, other minor fixes (by kahrl)
* Generalize hud_builtin_enable into hud_set_flagskwolekr2013-04-25
|