summaryrefslogtreecommitdiff
path: root/modules/enet/enet_multiplayer_peer.cpp
AgeCommit message (Collapse)Author
2022-07-26[Net] Modularize multiplayer, expose MultiplayerAPI to extensions.Fabio Alessandrelli
- RPC configurations are now dictionaries. - Script.get_rpc_methods renamed to Script.get_rpc_config. - Node.rpc[_id] and Callable.rpc now return an Error. - Refactor MultiplayerAPI to allow extension. - New MultiplayerAPI.rpc method with Array argument (for scripts). - Move the default MultiplayerAPI implementation to a module.
2022-01-03Update copyright statements to 2022RĂ©mi Verschelde
Happy new year to the wonderful Godot community!
2022-01-02Fix various typosluz paz
Found via ` codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,expct,fave,findn,gird,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint,varn` Update editor/import/resource_importer_layered_texture.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update doc/classes/TileSetScenesCollectionSource.xml Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/gui/graph_edit.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/resources/animation.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/resources/animation.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/resources/animation.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/gui/rich_text_label.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Revert previously committed change
2021-12-15[Net] ENet poll now only service the connection once.Jordan Schidlowsky
It used to call `enet_host_service` until all events were consumed, but that also meant constantly polling the connection leading to potentially unbounded processing time. It now only service the connection once, and instead consumes all the retrieved events via `enet_host_check_events`.
2021-12-15[Net] ENetMultiplayerPeer now sends fragmented packets unreliably too.Jordan Schidlowsky
It used to always send them reliably when transfer mode was unreliable or ordered if the packet size was more then the enet host MTU (1400 bytes by default). This commit also adds a warning when debug is enabled to explain the effects of sending fragmented packets unreliably.
2021-10-01[Net] Rename RPC constants and annotation arguments.Fabio Alessandrelli
any -> any_peer sync -> call_local ordered -> unreliable_ordered Multiplayer.RPC_MODE_ANY -> RPC_MODE_ANY_PEER Multiplayer.TRANSFER_MODE_ORDERED -> TRANSFER_MODE_UNRELIABLE_ORDERED
2021-09-28Merge pull request #52481 from Faless/net/4.x_native_peersFabio Alessandrelli
[Net] Extension system for network peers, webrtc.
2021-09-27[ENet] Fix server not correctly relaying peer disconnects.Fabio Alessandrelli
2021-09-24[Net] MultiplayerPeer cleanup, defaults.Fabio Alessandrelli
2021-09-07[Net] Move multiplayer to core subdir, split RPCManager.Fabio Alessandrelli
Move multiplayer classes to "core/multiplayer" subdir. Move the RPCConfig and enums (TransferMode, RPCMode) to a separate file (multiplayer.h), and bind them to the global namespace. Move the RPC handling code to its own class (RPCManager). Renames "get_rpc_sender_id" to "get_remote_sender_id".
2021-09-02[Net] Silence ENetMultiplayerPeer close_connection.Fabio Alessandrelli
Used to print an error when it was not active, now it just returns immediately as per the documentation.
2021-08-06[Net] Fix ENetMultiplayerPeer status during connection.Fabio Alessandrelli
While the client emitting "peer_connect" for the server, the status was still set to CONNECTION_CONNECTING, causing bugs in the upper layer.
2021-07-30[Net] Implement RPC channels in MultiplayerAPI.Fabio Alessandrelli
2021-07-29[Net] Refactor ENetMultiplayerPeer to use ENet wrappers.Fabio Alessandrelli
2021-07-29[Net] Add generate_unique_id to MultiplayerPeer.Fabio Alessandrelli
Used by ENetMultiplayerPeer and WebSocketServer to generate network IDs, and exposed to the user for p2p networks (e.g. WebRTCMultiplayerPeer) and custom MultiplayerPeer implementations.
2021-07-18Optimize StringName usagereduz
* Added a new macro SNAME() that constructs and caches a local stringname. * Subsequent usages use the cached version. * Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time. * Replaced all theme usages by this new macro. * Replace all signal emission usages by this new macro. * Replace all call_deferred usages by this new macro. This is part of ongoing work to optimize GUI and the editor.
2021-07-12[Net] Rename NetworkedMultiplayerENet to ENetMultiplayerPeer.Fabio Alessandrelli