summaryrefslogtreecommitdiffstats
path: root/modules/websocket/emws_client.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [WebSocket] Refactor websocket module.Fabio Alessandrelli2022-10-111-159/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is a huge refactor of the websocket module. The module is really old, and some design choices had to be re-evaluated. The WebSocketClient and WebSocketServer classes are now gone, and WebSocketPeer can act as either client or server. The WebSocketMultiplayerPeer class is no longer abstract, and implements the Multiplayer API on top of the lower level WebSocketPeer. WebSocketPeer is now a "raw" peer, like StreamPeerTCP and StreamPeerTLS, so it emits no signal, and just needs polling to update its internal state. To use it as a client, simply call WebSocketPeer.coonect_to_url, then frequently poll the peer until STATE_OPEN is reached and then you can write or read from it, or STATE_CLOSED and then you can check the disconnect code and reason). To implement a server instead, a TCPServer must be created, and the accepted connections needs to be provided to WebSocketPeer.accept_stream (which will perform the HTTP handshake). A full example of a WebSocketServer using TLS will be provided in the demo repository.
* [Net] Rename "ssl" references to "tls" in methods and members.Fabio Alessandrelli2022-09-081-3/+3
|
* [Web] Rename JavaScript platform to Web.Fabio Alessandrelli2022-08-291-6/+6
| | | | Also rename export name from "HTML5" to "Web".
* Style: Cleanup single-line blocks, semicolons, dead codeRémi Verschelde2022-02-161-3/+7
| | | | | Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Websocket peer outbound buffer fixes. Expose outbound buffered amount.Jordan Schidlowsky2021-07-311-1/+2
|
* Fix various typos with codespellluz paz2021-07-251-1/+1
| | | | Found via `codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,fave,findn,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint`
* [Net] Rename NetworkedMultiplayerPeer to MultiplayerPeer.Fabio Alessandrelli2021-07-121-1/+1
|
* Rename `IP_Unix`, `IP_Address` and `TCP_Server` to remove underscoresHugo Locurcio2021-05-061-2/+2
|
* Initialize class/struct variables with default values in modules/Rafał Mikrut2021-02-081-4/+0
|
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* [HTML5] Port JavaScript inline code to libraries.Fabio Alessandrelli2020-11-101-118/+26
| | | | | | | | | The API is implemented in javascript, and generates C functions that can be called from godot. This allows much cleaner code replacing all `EM_ASM` calls in our C++ code with plain C function calls. This also gets rid of few hacks and comes with few optimizations (e.g. custom cursor shapes should be much faster now).
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-1/+1
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-7/+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.
* Remove WebSocket defaults from project settings.Fabio Alessandrelli2020-05-121-2/+3
| | | | | 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'.
* Style: Set clang-format Standard to Cpp11Rémi Verschelde2020-03-171-1/+1
| | | | | | | | | | 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 EMWSClient::get_connection_status(), try catchFabio Alessandrelli2020-02-151-8/+14
|
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | 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.
* Fix HTML5 build after 67a4c30.Fabio Alessandrelli2019-10-151-2/+8
| | | | I messed up a rebase and a commit was partly skipped
* Custom headers support in WebSocketClient.Fabio Alessandrelli2019-10-091-1/+4
| | | | | This commit also converts all PoolVector<String> parameters to `const Vector<String>` in both WebSocketServer and WebSocketClient.
* WebSocketClient can now use custom SSL certificateFabio Alessandrelli2019-10-091-1/+5
| | | | Via the `trusted_ssl_certificate` property.
* Re-implement WebSocket get host/port.Fabio Alessandrelli2019-10-091-2/+2
| | | | Was lost during library switch
* Allow setting websocket buffers sizes internally.Fabio Alessandrelli2019-06-151-0/+6
| | | | Needed by LSP.
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Fix missing/malformed license headersRémi Verschelde2019-01-011-0/+1
|
* Fix HTML5 WebSocket client buffers size.Fabio Alessandrelli2018-12-261-2/+2
|
* Convert WebSocket module to use PacketBuffer classFabio Alessandrelli2018-11-121-3/+11
|
* Implement WebSocket clean close detection.Fabio Alessandrelli2018-09-241-2/+2
|
* Implement WebSocket close notify.Fabio Alessandrelli2018-09-241-2/+3
|
* Allow WebSocket connect with no sub-protocols.Fabio Alessandrelli2018-08-301-10/+8
|
* Removed unnecessary assignmentsWilson E. Alvarez2018-07-241-1/+0
|
* s/2017/2018/g for gles2, websocket, linux appdataPoommetee Ketson2018-03-211-2/+2
|
* Relicense module to the wondeful Godot community!Fabio Alessandrelli2018-02-061-3/+4
|
* Add websocket module.Fabio Alessandrelli2018-02-061-0/+223
Webassembly is client-only for obvious reasons. Other platforms support both client and server using libwebsockets.