godot/modules/websocket
Fabio Alessandrelli a8950f98dd [WebSocket] Refactor websocket module.
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-10-11 15:52:30 +02:00
..
doc_classes [WebSocket] Refactor websocket module. 2022-10-11 15:52:30 +02:00
editor [WebSocket] Refactor websocket module. 2022-10-11 15:52:30 +02:00
config.py SCons: Format buildsystem files with psf/black 2020-03-30 09:05:53 +02:00
emws_peer.cpp [WebSocket] Refactor websocket module. 2022-10-11 15:52:30 +02:00
emws_peer.h [WebSocket] Refactor websocket module. 2022-10-11 15:52:30 +02:00
library_godot_websocket.js Use 3001 instead of 1001 when destroying a websocket. 2022-03-18 10:09:50 -06:00
packet_buffer.h [WebSocket] Refactor websocket module. 2022-10-11 15:52:30 +02:00
register_types.cpp [WebSocket] Refactor websocket module. 2022-10-11 15:52:30 +02:00
register_types.h Refactor module initialization 2022-05-04 17:34:51 +02:00
remote_debugger_peer_websocket.cpp [WebSocket] Refactor websocket module. 2022-10-11 15:52:30 +02:00
remote_debugger_peer_websocket.h [WebSocket] Refactor websocket module. 2022-10-11 15:52:30 +02:00
SCsub SCons: Unify tools/target build type configuration 2022-09-26 16:31:46 +02:00
websocket_multiplayer_peer.cpp [WebSocket] Refactor websocket module. 2022-10-11 15:52:30 +02:00
websocket_multiplayer_peer.h [WebSocket] Refactor websocket module. 2022-10-11 15:52:30 +02:00
websocket_peer.cpp [WebSocket] Refactor websocket module. 2022-10-11 15:52:30 +02:00
websocket_peer.h [WebSocket] Refactor websocket module. 2022-10-11 15:52:30 +02:00
wsl_peer.cpp [WebSocket] Refactor websocket module. 2022-10-11 15:52:30 +02:00
wsl_peer.h [WebSocket] Refactor websocket module. 2022-10-11 15:52:30 +02:00