summaryrefslogtreecommitdiffstats
path: root/modules/websocket
Commit message (Collapse)AuthorAgeFilesLines
...
* [Websocket] Remove dummy JS server implemenation.Fabio Alessandrelli2022-08-073-158/+3
| | | | | It does nothing but printing errors (only websocket client is available in browsers), so we might as well return null when you instantiate it.
* [Net] Modularize multiplayer, expose MultiplayerAPI to extensions.Fabio Alessandrelli2022-07-261-1/+1
| | | | | | | | | - 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.
* Code quality: Fix header guards consistencyRémi Verschelde2022-07-258-24/+25
| | | | | Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.
* Replace most uses of Map by HashMapreduz2022-05-163-3/+3
| | | | | | | | | | | | * 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!
* [WebSocket] Fix WSLClient connection status.Fabio Alessandrelli2022-05-042-8/+7
| | | | | | | 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.
* Refactor module initializationreduz2022-05-042-15/+25
| | | | | | | * 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).
* Merge pull request #60444 from snailrhymer/expand-websocketclient-error-messagesFabio Alessandrelli2022-05-031-5/+9
|\ | | | | Add detail to some error messages in wsl_client
| * Add detail to some error messages in wsl_clientSnailRhymer2022-04-221-5/+9
| | | | | | | | Add messages, and add expected and actual values to other messages in _verify_headers for easier troubleshooting.
* | Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`Rémi Verschelde2022-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #59582 from Faless/net/4.x_tcp_explicit_pollRémi Verschelde2022-04-271-1/+2
|\ \ | |/ |/|
| * [Net] Drop is_connected_to_host for TCP and UDP.Fabio Alessandrelli2022-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | 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.
| * [Net] Make StreamPeerTCP::_poll_connection explicit.Fabio Alessandrelli2022-03-271-0/+1
| | | | | | | | | | | | No longer hacked into `get_status` and renamed to `poll`. The old `poll` (for *nix `poll`, win `select`) is now called `wait`.
* | Added set_extra_headers() to WebSocketServerOğuzhan Eroğlu2022-04-127-3/+25
| |
* | Fix some issues found by cppcheck.bruvzg2022-04-069-82/+82
| |
* | Modules: Don't build editor-specific classes in templatesRémi Verschelde2022-03-285-6/+20
|/ | | | | They're moved to an `editor` subfolder so that we can easily handle them separately.
* Use 3001 instead of 1001 when destroying a websocket.Jason Knight2022-03-181-1/+1
|
* Discern between virtual and abstract class bindingsreduz2022-03-101-1/+1
| | | | | | | | | | | | | | * 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.
* Style: Cleanup single-line blocks, semicolons, dead codeRémi Verschelde2022-02-162-5/+11
| | | | | Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
* Add an XML schema for documentationHugo Locurcio2022-02-154-4/+4
| | | | | | | | 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.
* Fix typos with codespellRémi Verschelde2022-02-101-1/+1
| | | | | | | 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.
* [Net] Non-blocking WebSocket hostname resolution.Jordan Schidlowsky2022-02-052-21/+56
| | | | | | 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.
* Rename or refactor macros to avoid leading underscoresOmar Polo2022-01-202-15/+15
| | | | | These are not used consistently and some can conflict with system-specific defines. While here, also delete some unused macros.
* Fixed incorrect property typesArnav Vijaywargiya2022-01-111-1/+1
|
* Update copyright statements to 2022Rémi Verschelde2022-01-0329-58/+58
| | | | Happy new year to the wonderful Godot community!
* Fix usage of "Return" in the docskobewi2022-01-021-2/+2
|
* Replace String comparisons with "", String() to is_empty()Nathan Franke2021-12-091-3/+3
| | | | | | Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
* Auto-Increment Debugger PortNathan Franke2021-12-042-8/+40
| | | | 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.
* wslay: Sync with upstream 45d22583bRémi Verschelde2021-11-191-2/+1
| | | | | | | https://github.com/tatsuhiro-t/wslay/commit/45d22583b488f79d5a4e598cc7675c191c5ab53f Mostly style changes, a couple new methods and fixes. Tweak file structure a bit.
* Merge pull request #54344 from mhilbrunner/rpc-error-msgsFabio Alessandrelli2021-10-292-6/+9
|\ | | | | Websockets: Fix buffer size checks in put_packet(), silent failures/connection hangs
| * Websockets: Fix buffer size checks in put_packet()Max Hilbrunner2021-10-292-6/+9
| | | | | | | | Also check the error return value of wslay_event_queue_msg()
* | Fix Macros -> Mactos typo in WEBSOCKETMACTOS_HMax Hilbrunner2021-10-281-3/+3
|/
* Save all 64 bits of get_ticks_msec() in more casesMax Hilbrunner2021-10-261-1/+1
|
* Fix missing argument names in bindingsRémi Verschelde2021-10-092-5/+5
| | | | | | While at it, tweak some boolean setters to use `p_enabled` for the bool. Also renames `draw_minimap()` to `set_draw_minimap()`.
* Fix small typos regarding WebSocketPeerInfinixius2021-10-061-1/+1
|
* Use range iterators for `Map`Lightning_A2021-09-302-16/+16
|
* Merge pull request #52481 from Faless/net/4.x_native_peersFabio Alessandrelli2021-09-283-36/+0
|\ | | | | [Net] Extension system for network peers, webrtc.
| * [Net/Docs] Update extensions documentation.Fabio Alessandrelli2021-09-241-4/+0
| |
| * [Net] MultiplayerPeer cleanup, defaults.Fabio Alessandrelli2021-09-242-32/+0
| |
* | Document Android permission requirements for network access where neededHugo Locurcio2021-09-253-0/+3
|/
* Don't generate empty doc sections and reduce code duplicationAaron Franke2021-09-203-6/+0
|
* Merge pull request #52226 from Faless/debugger/4.x_start_optionsRémi Verschelde2021-09-142-4/+12
|\
| * [Editor] Editor debugger binds according to editor settings.Fabio Alessandrelli2021-08-292-4/+12
| |
* | Multiplayer networking renames/simplificationMax Hilbrunner2021-09-083-4/+4
| | | | | | | | 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.
* | [Net] Move multiplayer to core subdir, split RPCManager.Fabio Alessandrelli2021-09-073-7/+7
| | | | | | | | | | | | | | | | | | | | | | 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".
* | Try other resolved IPs if one fails to connectHaoyu Qiu2021-08-302-6/+24
|/
* HTML5: Fix warnings and re-enable `werror=yes` on CIRémi Verschelde2021-08-061-1/+1
| | | | | Add a missing call to disable warnings on a forked env for freetype's `sfnt.c`.
* Merge pull request #51005 from Faless/mp/4.x_channelsRémi Verschelde2021-08-042-0/+10
|\ | | | | [Net] Implement RPC channels in MultiplayerAPI.
| * [Net] Implement RPC channels in MultiplayerAPI.Fabio Alessandrelli2021-07-302-0/+10
| |
* | Merge pull request #51036 from winterpixelgames/master-ws-fixRémi Verschelde2021-08-0110-4/+56
|\ \ | |/ |/| WebsocketPeer outbound buffer fixes and buffer size query
| * Websocket peer outbound buffer fixes. Expose outbound buffered amount.Jordan Schidlowsky2021-07-3110-4/+56
| |