summaryrefslogtreecommitdiff
path: root/modules/websocket
AgeCommit message (Collapse)Author
2022-08-08Rename the argument tag to param in XML documentationYuri Sizov
2022-08-07[Websocket] Remove dummy JS server implemenation.Fabio Alessandrelli
It does nothing but printing errors (only websocket client is available in browsers), so we might as well return null when you instantiate it.
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-07-25Code quality: Fix header guards consistencyRémi Verschelde
Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.
2022-05-16Replace most uses of Map by HashMapreduz
* Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
2022-05-04[WebSocket] Fix WSLClient connection status.Fabio Alessandrelli
Note, this keeps the old behaviour of reporting CONNECTION_CONNECTED while disconnecting. We should change this before 4.0, but needs further refactoring of the WebSocket classes.
2022-05-04Refactor module initializationreduz
* Changed to use the same stages as extensions. * Makes the initialization more coherent, helping solve problems due to lack of stages. * Makes it easier to port between module and extension. * removed the DRIVER initialization level (no longer needed).
2022-05-03Merge pull request #60444 from snailrhymer/expand-websocketclient-error-messagesFabio Alessandrelli
Add detail to some error messages in wsl_client
2022-05-02Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`Rémi Verschelde
Didn't commit all the changes where it wants to initialize a struct with `{}`. Should be reviewed in a separate PR. Option `IgnoreArrays` enabled for now to be conservative, can be disabled to see if it proposes more useful changes. Also fixed manually a handful of other missing initializations / moved some from constructors.
2022-04-27Merge pull request #59582 from Faless/net/4.x_tcp_explicit_pollRémi Verschelde
2022-04-22Add detail to some error messages in wsl_clientSnailRhymer
Add messages, and add expected and actual values to other messages in _verify_headers for easier troubleshooting.
2022-04-12Added set_extra_headers() to WebSocketServerOğuzhan Eroğlu
2022-04-06Fix some issues found by cppcheck.bruvzg
2022-03-28Modules: Don't build editor-specific classes in templatesRémi Verschelde
They're moved to an `editor` subfolder so that we can easily handle them separately.
2022-03-27[Net] Drop is_connected_to_host for TCP and UDP.Fabio Alessandrelli
The UDP method is now called `is_socket_connected` to limit confusion with the actual host connection status which doesn't make sense in UDP. The TCP method is completly dropped, use get_status instead. The only one left is the WebSocketPeer one, which should be fine as is for now.
2022-03-27[Net] Make StreamPeerTCP::_poll_connection explicit.Fabio Alessandrelli
No longer hacked into `get_status` and renamed to `poll`. The old `poll` (for *nix `poll`, win `select`) is now called `wait`.
2022-03-18Use 3001 instead of 1001 when destroying a websocket.Jason Knight
2022-03-10Discern between virtual and abstract class bindingsreduz
* Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract". * Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions. * Converted a large amount of classes from "abstract" to "virtual" where it makes sense. Most classes that make sense have been converted. Missing: * Physics servers * VideoStream * Script* classes. which will go in a separate PR due to the complexity involved.
2022-02-16Style: Cleanup single-line blocks, semicolons, dead codeRémi Verschelde
Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
2022-02-15Add an XML schema for documentationHugo Locurcio
This makes it easier to spot syntax errors when editing the class reference. The schema is referenced locally so validation can still work offline. Each class XML's schema conformance is also checked on GitHub Actions.
2022-02-10Fix typos with codespellRémi Verschelde
Using codespell 2.2-dev from current git. Added `misc/scripts/codespell.sh` to make it easier to run it once in a while and update the skip and ignore lists.
2022-02-05[Net] Non-blocking WebSocket hostname resolution.Jordan Schidlowsky
Hostname is now resolved during poll in WebSocketClient (wslay) to avoid blocking during connect. An attempt is still made to find the hostname in the resolver cache.
2022-01-20Rename or refactor macros to avoid leading underscoresOmar Polo
These are not used consistently and some can conflict with system-specific defines. While here, also delete some unused macros.
2022-01-11Fixed incorrect property typesArnav Vijaywargiya
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2022-01-02Fix usage of "Return" in the docskobewi
2021-12-09Replace String comparisons with "", String() to is_empty()Nathan Franke
Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
2021-12-04Auto-Increment Debugger PortNathan Franke
Note: This PR also changes the port of the GDScript Language Server from 6008 to 6005. This opens enough ports above the debug port (6007) for this change to be useful.
2021-11-19wslay: Sync with upstream 45d22583bRémi Verschelde
https://github.com/tatsuhiro-t/wslay/commit/45d22583b488f79d5a4e598cc7675c191c5ab53f Mostly style changes, a couple new methods and fixes. Tweak file structure a bit.
2021-10-29Merge pull request #54344 from mhilbrunner/rpc-error-msgsFabio Alessandrelli
Websockets: Fix buffer size checks in put_packet(), silent failures/connection hangs
2021-10-29Websockets: Fix buffer size checks in put_packet()Max Hilbrunner
Also check the error return value of wslay_event_queue_msg()
2021-10-28Fix Macros -> Mactos typo in WEBSOCKETMACTOS_HMax Hilbrunner
2021-10-26Save all 64 bits of get_ticks_msec() in more casesMax Hilbrunner
2021-10-09Fix missing argument names in bindingsRémi Verschelde
While at it, tweak some boolean setters to use `p_enabled` for the bool. Also renames `draw_minimap()` to `set_draw_minimap()`.
2021-10-06Fix small typos regarding WebSocketPeerInfinixius
2021-09-30Use range iterators for `Map`Lightning_A
2021-09-28Merge pull request #52481 from Faless/net/4.x_native_peersFabio Alessandrelli
[Net] Extension system for network peers, webrtc.
2021-09-25Document Android permission requirements for network access where neededHugo Locurcio
2021-09-24[Net/Docs] Update extensions documentation.Fabio Alessandrelli
2021-09-24[Net] MultiplayerPeer cleanup, defaults.Fabio Alessandrelli
2021-09-20Don't generate empty doc sections and reduce code duplicationAaron Franke
2021-09-14Merge pull request #52226 from Faless/debugger/4.x_start_optionsRémi Verschelde
2021-09-08Multiplayer networking renames/simplificationMax Hilbrunner
Removes _networking_ prefix from some methods and members, now that multiplayer has been largely moved out of Node and SceneTree and is seperated into its own set of classes.
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-08-30Try other resolved IPs if one fails to connectHaoyu Qiu
2021-08-29[Editor] Editor debugger binds according to editor settings.Fabio Alessandrelli
2021-08-06HTML5: Fix warnings and re-enable `werror=yes` on CIRémi Verschelde
Add a missing call to disable warnings on a forked env for freetype's `sfnt.c`.
2021-08-04Merge pull request #51005 from Faless/mp/4.x_channelsRémi Verschelde
[Net] Implement RPC channels in MultiplayerAPI.
2021-08-01Merge pull request #51036 from winterpixelgames/master-ws-fixRémi Verschelde
WebsocketPeer outbound buffer fixes and buffer size query
2021-07-31Websocket peer outbound buffer fixes. Expose outbound buffered amount.Jordan Schidlowsky