summaryrefslogtreecommitdiff
path: root/modules/websocket/websocket_macros.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-21Style: Ensure consistent formatting with clang-format 15Rémi Verschelde
When going from version 14 to 15 it would introduce a tiny change in `websocket_macros.h` just before the comment re-enabling clang-format, but this can be solved by just letting it do its work. Bonus cosmetic change in `math_fieldwise.cpp` where clang-format isn't used, and bump recommended versions for pre-commit hook to [13; 15].
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-10-28Fix Macros -> Mactos typo in WEBSOCKETMACTOS_HMax Hilbrunner
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-12Remove WebSocket defaults from project settings.Fabio Alessandrelli
Can be manually set, let's not pollute them further. Should also be done for WebRTC.
2020-04-02Replace NULL with nullptrlupoDharkael
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-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2019-01-01Fix missing/malformed license headersRémi Verschelde
2018-11-12Convert WebSocket module to use PacketBuffer classFabio Alessandrelli
2018-03-21s/2017/2018/g for gles2, websocket, linux appdataPoommetee Ketson
2018-02-06Relicense module to the wondeful Godot community!Fabio Alessandrelli
2018-02-06Add websocket module.Fabio Alessandrelli
Webassembly is client-only for obvious reasons. Other platforms support both client and server using libwebsockets.