summaryrefslogtreecommitdiffstats
path: root/modules/websocket
Commit message (Collapse)AuthorAgeFilesLines
* Add override keywords.Marcel Admiraal2020-07-105-35/+19
|
* Remove String::find_last (same as rfind)Stijn Hinlopen2020-07-031-1/+1
|
* websocket: Fix crash at exit when not running the editorIgnacio Etcheverry2020-05-161-1/+8
| | | | | | | EditorDebuggerServer::register_protocol_handler must not be called before editor initialization. Otherwise, if the editor is never initialized, the added StringName will not be released until static destructors are called (instead of being release during editor deinitialization).
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-148-45/+83
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-1423-100/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Style: Fix missing/invalid copyright headersRémi Verschelde2020-05-144-12/+12
|
* Modernize remaining uses of 0/NULL instead of nullptr (C++11)Rémi Verschelde2020-05-142-3/+3
| | | | | Using clang-tidy's `modernize-use-nullptr`. https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
* Add WebSocket debugger, use it for Javascript.Fabio Alessandrelli2020-05-125-0/+363
|
* Remove WebSocket defaults from project settings.Fabio Alessandrelli2020-05-125-35/+14
| | | | | Can be manually set, let's not pollute them further. Should also be done for WebRTC.
* Fix Closure compiler build, python style.Fabio Alessandrelli2020-05-101-3/+3
| | | | Move copyToFS into utils.js library included with '--pre-js'.
* Replace NULL with nullptrlupoDharkael2020-04-028-26/+26
|
* SCons: Format buildsystem files with psf/blackRémi Verschelde2020-03-302-4/+7
| | | | | | | | | | | | | | | | | | | | | Configured for a max line length of 120 characters. psf/black is very opinionated and purposely doesn't leave much room for configuration. The output is mostly OK so that should be fine for us, but some things worth noting: - Manually wrapped strings will be reflowed, so by using a line length of 120 for the sake of preserving readability for our long command calls, it also means that some manually wrapped strings are back on the same line and should be manually merged again. - Code generators using string concatenation extensively look awful, since black puts each operand on a single line. We need to refactor these generators to use more pythonic string formatting, for which many options are available (`%`, `format` or f-strings). - CI checks and a pre-commit hook will be added to ensure that future buildsystem changes are well-formatted.
* Adding missing include guards to header files identified by LGTM.Rajat Goswami2020-03-231-0/+5
| | | | This addresses the issue godotengine/godot#37143
* Style: Set clang-format Standard to Cpp11Rémi Verschelde2020-03-176-14/+14
| | | | | | | | | | For us, it practically only changes the fact that `A<A<int>>` is now used instead of the C++03 compatible `A<A<int> >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`.
* Fix Javascript platform after PoolVector removal.Fabio Alessandrelli2020-03-081-3/+2
| | | | Eval should be rechecked.
* doc: Sync classref with current sourceRémi Verschelde2020-02-182-3/+3
| | | | Handle removal of Pool*Array types and other recent changes.
* PoolVector is gone, replaced by VectorJuan Linietsky2020-02-188-20/+20
| | | | | Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
* Fix EMWSClient::get_connection_status(), try catchFabio Alessandrelli2020-02-152-13/+24
|
* Update docs to version 4.0clayjohn2020-01-314-4/+4
|
* Disable Nagle's algorithm for WebSocket TCP.Fabio Alessandrelli2020-01-289-0/+27
| | | | | | This should greatly decrease latency for the most common use cases. A new function WebSocketPeer::set_no_delay will allow to configure it if so desired.
* Merge pull request #35516 from Faless/ws/fix_latency_32Rémi Verschelde2020-01-263-4/+6
|\ | | | | Lower WebSocket latency, fixes.
| * Lower WebSocket latency, fixes.Fabio Alessandrelli2020-01-243-4/+6
| | | | | | | | | | WSLPeer now tries to flush packet queue after put_packet call. WSLServer::listen correctly returns TCP_Server::listen return value.
* | doc: Drop unused 'category' property from headerRémi Verschelde2020-01-264-4/+4
| | | | | | | | | | | | | | | | | | | | We already removed it from the online docs with #35132. Currently it can only be "Built-In Types" (Variant types) or "Core" (everything else), which is of limited use. We might also want to consider dropping it from `ClassDB` altogether in Godot 4.0.
* | doc: Misc updates for AnimationNode* and othersRémi Verschelde2020-01-231-1/+1
|/ | | | | | | | | | | | | - Add some missing descriptions. - Add links to tutorials for ARVR and AnimationTree. - Style fixes. - Engine changes: * Make `AnimationNodeTransition.input_<number>` properties internal so that they don't appear in the docs. They still appear in the inspector based on the actual number of inputs requested. * Drop unimplemented `CPUParticles.flatness`. It's only used for 3D particles in `ParticlesMaterial`, and thus only relevant for `CPUParticles3D`.
* Fix MultiplayerAPI crash when peer impl misbehave.Fabio Alessandrelli2020-01-211-1/+1
| | | | | Also fix WebSocketMultiplayer::get_available_packet_count() return value when peer is not configured to use the multiplayer API.
* Validate input in (CPU)Particles set_emission_shape()Rémi Verschelde2020-01-161-1/+1
| | | | | | Fixes #29777. Co-authored-by: Cameron Reikes <cameronreikes@gmail.com>
* Prevent GDScript language server from listening to external hosts by defaultHoukime2020-01-154-1/+24
| | | | | | | | | | * Add bind_ip property to WebSocketServer defaulting to "*" (listen to everyone) * Set default for GDscript Language Server to listen only to localhost Fixes potential security issue with GDScript language server being exposed to the broad net by default. Since it is the server which primary usage is to provide utility to the local editor there is no need to expose it.
* Update documentation to reflect HTML5 limitations.Fabio Alessandrelli2020-01-142-2/+4
|
* Update copyright statements to 2020Rémi Verschelde2020-01-0124-48/+48
| | | | | | | | | | | Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
* WSLPeer now prevents receiving data after close.Fabio Alessandrelli2019-12-212-1/+4
| | | | | Used to spit error and report empty packets when connection was still half-closed (waiting for confirmation from other end).
* Fix Visual Studio throwing C4334 warning.Marcel Admiraal2019-11-151-1/+1
|
* Trim protocol field from spaces in WS classes.Fabio Alessandrelli2019-10-162-5/+15
|
* Fix HTML5 build after 67a4c30.Fabio Alessandrelli2019-10-154-5/+11
| | | | I messed up a rebase and a commit was partly skipped
* doc: Sync classref with current sourceRémi Verschelde2019-10-111-2/+2
|
* Document all this new improvements.Fabio Alessandrelli2019-10-092-0/+31
|
* Custom headers support in WebSocketClient.Fabio Alessandrelli2019-10-0910-22/+30
| | | | | This commit also converts all PoolVector<String> parameters to `const Vector<String>` in both WebSocketServer and WebSocketClient.
* Implement WebSocketServer SSL support.Fabio Alessandrelli2019-10-094-1/+75
|
* WebSocketClient can now use custom SSL certificateFabio Alessandrelli2019-10-094-2/+26
| | | | Via the `trusted_ssl_certificate` property.
* Re-implement WebSocket get host/port.Fabio Alessandrelli2019-10-097-13/+19
| | | | Was lost during library switch
* doc: Fix parsing of self-closing XML tagsRémi Verschelde2019-09-241-2/+2
| | | | | | | Follow-up to #31925, `<member />` tags just before `</members>` would cause a parsing issue, and we'd never notice that we're no longer parsing members. Also added space before closing `/>`.
* Run doctool after overridden properties changesBojidar Marinov2019-09-041-0/+4
|
* Style: Fix copyright headers in new filesRémi Verschelde2019-08-281-1/+1
|
* Merge pull request #29871 from Faless/crypto/initial_prRémi Verschelde2019-08-211-1/+1
|\ | | | | More Crypto, SSL server, crt/key as Resource, HashingContext
| * Move CryptoCore to it's own folder.Fabio Alessandrelli2019-08-191-1/+1
| | | | | | | | Crypto classes will be placed in core/crypto.
* | Merge pull request #31483 from Faless/ws/fix_double_relayRémi Verschelde2019-08-201-8/+2
|\ \ | | | | | | Fix WebSocketServer relaying message twice.
| * | Fix WebSocketServer relaying message 2 times.Fabio Alessandrelli2019-08-191-8/+2
| |/ | | | | | | | | | | | | | | | | The WebSocketMultiplayerPeer was relaying the same message two times, both in _server_relay and _process_multiplayer (which was only supposed to store the packet, given the server was one of the destination). _process_multiplayer now only store the packet, and calls _server_relay which will relay the message to other clients if needed.
* / WebSocketServer now sanitize destination peers.Fabio Alessandrelli2019-08-191-1/+4
|/ | | | | | | When relaying messages in multiplayer mode. Could cause a crash in case a malicious client sends a bogus packet and for those cases where a peer has just disconnected and a message arrive from another peer with the disconnected one as destination.
* Replace last occurrences of 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG'Rémi Verschelde2019-08-172-28/+23
| | | | | | | | | | The last remaining ERR_EXPLAIN call is in FreeType code and makes sense as is (conditionally defines the error message). There are a few ERR_EXPLAINC calls for C-strings where String is not included which can stay as is to avoid adding additional _MSGC macros just for that. Part of #31244.
* Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in rest of 'modules/'Robin Hübner2019-08-124-61/+23
|