summaryrefslogtreecommitdiff
path: root/modules/websocket
AgeCommit message (Collapse)Author
2019-08-12Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in rest of 'modules/'Robin Hübner
2019-07-28Fix WebSocketClient crash when unref during signalFabio Alessandrelli
Always call disconnect before emitting signals, to avoid calling it on a freed object if the user decides to unreference it in a signal.
2019-07-08Fix WebSocketClient consuming data during hanshakeFabio Alessandrelli
Was missing a break of the while loop on connection. This potentially caused early data frames to be trashed.
2019-07-08Merge pull request #30419 from Faless/ws/wslay_server_protoRémi Verschelde
(Re-)Implement subprotocols in websocket server.
2019-07-08(Re-)Implement subprotocols in websocket server.Fabio Alessandrelli
2019-07-07Fixes minor issues found by static analyzerqarmin
2019-07-04Optimize header reads (avoid extra allocs)Fabio Alessandrelli
2019-07-04Remove libwebsocket. No longer used, yay!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.
2019-07-03SCons: Use CPPDEFINES instead of CPPFLAGS for pre-processor definesRémi Verschelde
It's the recommended way to set those, and is more portable (automatically prepends -D for GCC/Clang and /D for MSVC). We still use CPPFLAGS for some pre-processor flags which are not defines.
2019-06-27Proofread and improve the whole class referenceHugo Locurcio
- Document a few more properties and methods - Add more information to many classes - Fix lots of typos and gramar mistakes - Use [code] tags for parameters consistently - Use [b] and [i] tags consistently - Put "Warning:" and "Note:" on their own line to be more visible, and make them always bold - Tweak formatting in code examples to be more readable - Use double quotes consistently - Add more links to third-party technologies
2019-06-27doc: Replace all [code]CONSTANT[/code] by new [constant CONSTANT] hyperlinksRémi Verschelde
2019-06-26Some code changed with Clang-Tidyqarmin
2019-06-15Expose WebSocket set_buffers and document it.Fabio Alessandrelli
2019-06-15Allow setting websocket buffers sizes internally.Fabio Alessandrelli
Needed by LSP.
2019-05-01Revert "Update libwebsockets to 3.1 (plus UWP patch)"Fabio Alessandrelli
This reverts commit 90210c48627692d281554d6185b5db17a86c852a.
2019-04-30SCons: Always use env.Prepend for CPPPATHRémi Verschelde
Include paths are processed from left to right, so we use Prepend to ensure that paths to bundled thirdparty files will have precedence over system paths (e.g. `/usr/include` should have lowest priority).
2019-04-24SCons: Review uses of CCFLAGS, CXXFLAGS and CPPFLAGSRémi Verschelde
Many contributors (me included) did not fully understand what CCFLAGS, CXXFLAGS and CPPFLAGS refer to exactly, and were thus not using them in the way they are intended to be. As per the SCons manual: https://www.scons.org/doc/HTML/scons-user/apa.html - CCFLAGS: General options that are passed to the C and C++ compilers. - CFLAGS: General options that are passed to the C compiler (C only; not C++). - CXXFLAGS: General options that are passed to the C++ compiler. By default, this includes the value of $CCFLAGS, so that setting $CCFLAGS affects both C and C++ compilation. - CPPFLAGS: User-specified C preprocessor options. These will be included in any command that uses the C preprocessor, including not just compilation of C and C++ source files [...], but also [...] Fortran [...] and [...] assembly language source file[s]. TL;DR: Compiler options go to CCFLAGS, unless they must be restricted to either C (CFLAGS) or C++ (CXXFLAGS). Preprocessor defines go to CPPFLAGS.
2019-04-19doc: Drop unused <demos> tagRémi Verschelde
2019-04-12Move IDHandler JS module to platform from WebsockFabio Alessandrelli
2019-04-02Enable warnings=extra on clang and GCC testers.marxin
And remove 2 warnings from warnings=extra.
2019-04-01doc: Bump version to 3.2Rémi Verschelde
2019-03-06Update libwebsockets to 3.1 (plus UWP patch)Fabio Alessandrelli
2019-02-27Fix -Wsign-compare warnings.marxin
I decided to modify code in a defensive way. Ideally functions like size() or length() should return an unsigned type.
2019-02-20Add -Wshadow=local to warnings and fix reported issues.marxin
Fixes #25316.
2019-02-18Fix warnings seen with warnings=all and recent GCC 8.2.marxin
2019-02-12Modules: Ensure classes match their header filenameRémi Verschelde
Renamed: - `modules/mono/mono_gd/gd_mono_class_member.h` -> `i_mono_class_member.h` - `modules/upnp/upnpdevice.h` -> `upnp_device.h` - `modules/websocket/websocket_multiplayer.h` -> `websocket_multiplayer_peer.h`
2019-01-28Update docs and errors for WebSocket moduleFabio Alessandrelli
2019-01-07doc: Fix wrong references found by new makerst.pyRémi Verschelde
Thanks @PJB3005
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-12-26Fix HTML5 WebSocket client buffers size.Fabio Alessandrelli
2018-12-20doc: Add missing commas after "If true/false"Rémi Verschelde
2018-11-25Websocket LWS keep servicing till no CB are leftFabio Alessandrelli
Apparently, only a single WRITABLE/READABLE callback is called at each servicing. For this reason, we want to keep servicing until we end up not receiving any callback. When that happens, we can assume that we can't (or don't want to) write more, and that there is nothing left to read in the socket buffer.
2018-11-12Convert WebSocket module to use PacketBuffer classFabio Alessandrelli
2018-11-12Add new PacketBuffer class for buffered peersFabio Alessandrelli
2018-11-10Merge pull request #23490 from Faless/lws_client_memfixRémi Verschelde
Fix access to freed mem in WS client after #23241
2018-11-08-Moved EditorDefaultValue to ClassDB, made it coreJuan Linietsky
-Removed one and zero hints for properties, replaced by default value
2018-11-03Fix access to freed mem in WS client after #23241Fabio Alessandrelli
I was wrong in assuming that String had to survive long enough to avoid it, what actually needed to survive was the CharString obtained from the acsii() or utf8() function. At least according to valgrind
2018-10-23Add missing EMWSServer::poll function.Fabio Alessandrelli
Empty of course as server is not supported in HTML5, but the symbol must be defined.
2018-10-23Remove unneeded strncpy in lws_client.Fabio Alessandrelli
Pass the String buffer directly, lws_client_connect_via_info will copy them for us.
2018-10-19Fixing warnings generated by MSVCDualtagh Murray
Fixes #22684.
2018-10-07Fix LWSClient connect_to_host string termination.Fabio Alessandrelli
Coming from strncpy might get you a non-NULL terminated buffer. The solution, if you accept trunction, is to give one less byte to strncpy and manually set the last char in the buffer to '\0'. If the source string is shorter, than the buffer is padded with '\0' automatically.
2018-09-29Fix -Wunused-function in websocket moduleFabio Alessandrelli
2018-09-28SCons: Build thirdparty code in own env, disable warningsRémi Verschelde
Also remove unnecessary `Export('env')` in other SCsubs, Export should only be used when exporting *new* objects.
2018-09-28Remove socket_helper.h after NetSocket refactorFabio Alessandrelli
2018-09-27Fix warnings about unused variables [-Wunused-variable]Rémi Verschelde
Fixes the following GCC 5 warnings: ``` drivers/gles2/rasterizer_scene_gles2.cpp:1139:15: warning: unused variable 'offset' [-Wunused-variable] drivers/gles2/rasterizer_scene_gles2.cpp:1205:39: warning: unused variable 'multi_mesh' [-Wunused-variable] drivers/gles2/rasterizer_storage_gles2.cpp:359:7: warning: unused variable 'srgb' [-Wunused-variable] drivers/gles2/shader_gles2.cpp:1016:45: warning: unused variable 'texture_hints' [-Wunused-variable] editor/animation_track_editor.cpp:776:9: warning: unused variable 'keys_to' [-Wunused-variable] editor/editor_inspector.cpp:273:7: warning: unused variable 'vs_height' [-Wunused-variable] editor/editor_themes.cpp:202:10: warning: unused variable 'begin_time' [-Wunused-variable] editor/editor_themes.cpp:239:10: warning: unused variable 'end_time' [-Wunused-variable] editor/plugins/animation_blend_tree_editor_plugin.cpp:726:17: warning: unused variable 'an' [-Wunused-variable] editor/plugins/script_text_editor.cpp:1278:8: warning: unused variable 'fold_state' [-Wunused-variable] main/main.cpp:132:13: warning: 'use_vsync' defined but not used [-Wunused-variable] modules/cvtt/image_compress_cvtt.cpp:231:8: warning: unused variable 'y_end' [-Wunused-variable] modules/cvtt/image_compress_cvtt.cpp:311:6: warning: unused variable 'shift' [-Wunused-variable] modules/gdscript/gdscript_editor.cpp:58:7: warning: unused variable 'th' [-Wunused-variable] modules/gridmap/grid_map.cpp:1084:6: warning: unused variable 'ofs' [-Wunused-variable] modules/theora/video_stream_theora.cpp:442:9: warning: unused variable 'tr' [-Wunused-variable] modules/visual_script/visual_script_editor.cpp:2606:6: warning: unused variable 'count' [-Wunused-variable] modules/visual_script/visual_script_editor.cpp:2829:6: warning: unused variable 'seq_count' [-Wunused-variable] modules/visual_script/visual_script_editor.cpp:2844:24: warning: unused variable 'vnode_function' [-Wunused-variable] modules/websocket/lws_peer.cpp:122:12: warning: unused variable 'peer_data' [-Wunused-variable] modules/websocket/lws_peer.cpp:135:12: warning: unused variable 'peer_data' [-Wunused-variable] modules/websocket/lws_peer.cpp:63:12: warning: unused variable 'peer_data' [-Wunused-variable] modules/websocket/lws_peer.cpp:91:12: warning: unused variable 'peer_data' [-Wunused-variable] platform/android/export/export.cpp:763:16: warning: unused variable 'node_size' [-Wunused-variable] scene/gui/rich_text_label.cpp:850:10: warning: unused variable 'x_ofs' [-Wunused-variable] scene/gui/text_edit.cpp:653:8: warning: unused variable 'tab_w' [-Wunused-variable] scene/resources/bit_mask.cpp:186:6: warning: unused variable 'i' [-Wunused-variable] scene/resources/mesh.cpp:549:20: warning: '_array_name' defined but not used [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:107:10: warning: unused variable 'v2' [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:108:10: warning: unused variable 'v3' [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:109:10: warning: unused variable 'v4' [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:110:10: warning: unused variable 'v5' [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:111:10: warning: unused variable 'v0n' [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:112:10: warning: unused variable 'v1n' [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:113:10: warning: unused variable 'v2n' [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:114:10: warning: unused variable 'v3n' [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:115:10: warning: unused variable 'v4n' [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:116:10: warning: unused variable 'v5n' [-Wunused-variable] servers/visual/default_mouse_cursor.xpm:2:21: warning: 'default_mouse_cursor_xpm' defined but not used [-Wunused-variable] ```
2018-09-24Update WebSocket documentationFabio Alessandrelli
2018-09-24Implement WebSocket clean close detection.Fabio Alessandrelli
2018-09-24Implement WebSocket close notify.Fabio Alessandrelli