summaryrefslogtreecommitdiff
path: root/modules/websocket/wsl_server.h
AgeCommit message (Collapse)Author
2022-10-11[WebSocket] Refactor websocket module.Fabio Alessandrelli
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.
2022-09-08[Net] Rename "ssl" references to "tls" in methods and members.Fabio Alessandrelli
2022-09-07[Net] Rename StreamPeerSSL to StreamPeerTLS.Fabio Alessandrelli
SSL has been deprectated almost 10 years ago.
2022-08-29[Web] Rename JavaScript platform to Web.Fabio Alessandrelli
Also rename export name from "HTML5" to "Web".
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-04-12Added set_extra_headers() to WebSocketServerOğuzhan Eroğlu
2022-04-06Fix some issues found by cppcheck.bruvzg
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-10-26Save all 64 bits of get_ticks_msec() in more casesMax Hilbrunner
2021-07-17Expose the resource name the client used to the websocket serverMeriipu
This information is exposed to the websocket server through the client_connected-signal. example.com/chat?id=10 gives the resource name "/chat?id=10"
2021-06-28[Net] Add WebSocketServer handshake_timeout property.Fabio Alessandrelli
Allows customization of the maximum time a client is allowed to stay in the the "pending" state (i.e. awaiting HTTP handshake). This used to be 1 second by before, the new default is 3 seconds.
2021-06-11Rename Reference to RefCountedPedro J. Estébanez
2021-05-06Rename `IP_Unix`, `IP_Address` and `TCP_Server` to remove underscoresHugo Locurcio
2021-02-08Initialize class/struct variables with default values in modules/Rafał Mikrut
2021-01-01Update copyright statements to 2021Rémi Verschelde
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 🎆
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
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.
2020-03-17Style: Set clang-format Standard to Cpp11Rémi Verschelde
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`.
2020-01-01Update copyright statements to 2020Rémi Verschelde
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.
2019-10-09Custom headers support in WebSocketClient.Fabio Alessandrelli
This commit also converts all PoolVector<String> parameters to `const Vector<String>` in both WebSocketServer and WebSocketClient.
2019-10-09Implement WebSocketServer SSL support.Fabio Alessandrelli
2019-10-09Re-implement WebSocket get host/port.Fabio Alessandrelli
Was lost during library switch
2019-07-08(Re-)Implement subprotocols in websocket server.Fabio Alessandrelli
2019-07-04Optimize header reads (avoid extra allocs)Fabio Alessandrelli
2019-07-04WebSocket module now uses wslay library.Fabio Alessandrelli
Both client and server are supported on native builds (as usual). SSL server is still not supported, but will soon be possible with this new library. The API stays the same, we just need to work out potential issues due to this big library switch.