Fabio Alessandrelli
bafcde805c
Remove unneeded strncpy in lws_client.
...
Pass the String buffer directly, lws_client_connect_via_info will copy
them for us.
2018-10-23 12:31:47 +02:00
Dualtagh Murray
b902a2f2a7
Fixing warnings generated by MSVC
...
Fixes #22684 .
2018-10-19 11:45:24 +02:00
Fabio Alessandrelli
d65afb2c74
Fix LWSClient connect_to_host string termination.
...
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-10-07 14:50:14 +02:00
Fabio Alessandrelli
8b2688786f
Fix -Wunused-function in websocket module
2018-09-29 22:26:32 +02:00
Rémi Verschelde
3a2ca68af3
SCons: Build thirdparty code in own env, disable warnings
...
Also remove unnecessary `Export('env')` in other SCsubs,
Export should only be used when exporting *new* objects.
2018-09-28 14:07:39 +02:00
Fabio Alessandrelli
9d9a14e289
Remove socket_helper.h after NetSocket refactor
2018-09-28 02:03:23 +02:00
Rémi Verschelde
cda5b0bfe1
Fix warnings about unused variables [-Wunused-variable]
...
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-27 16:25:24 +02:00
Fabio Alessandrelli
df43b94e6e
Update WebSocket documentation
2018-09-24 01:50:37 +02:00
Fabio Alessandrelli
4b92956db7
Implement WebSocket clean close detection.
2018-09-24 01:50:37 +02:00
Fabio Alessandrelli
5d91e87c64
Implement WebSocket close notify.
2018-09-24 01:50:37 +02:00
Rémi Verschelde
1a16dabfb5
Merge pull request #21982 from luzpaz/misc-typos
...
Misc. typos
2018-09-13 10:59:00 +02:00
luz.paz
08bde5b2de
Misc. typos
...
Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
2018-09-12 21:39:17 -04:00
Rémi Verschelde
277b24dfb7
Make core/ includes absolute, remove subfolders from include path
...
This allows more consistency in the manner we include core headers,
where previously there would be a mix of absolute, relative and
include path-dependent includes.
2018-09-12 09:52:22 +02:00
Fabio Alessandrelli
6bc97cc7cc
Allow WebSocket connect with no sub-protocols.
2018-08-30 20:23:16 +02:00
Rémi Verschelde
139e621338
Merge pull request #20913 from pulkomandy/master
...
Rebase patches for fixing haiku build.
2018-08-13 21:26:15 +02:00
Adrien Destugues
a294a842cb
Rebase patches for fixing haiku build.
2018-08-11 17:20:51 +02:00
Fabio Alessandrelli
6a57f29573
Fix WebSocket crash due to non PDO init.
...
Move RingBuffer (and few related vars) to LWSPeer.
2018-08-06 03:47:02 +02:00
Wilson E. Alvarez
a22e746bc3
Removed unnecessary assignments
2018-07-24 09:51:03 +02:00
Rémi Verschelde
7c9f7452f4
Style: Format code with clang-format 6.0.1
2018-07-18 16:27:03 +02:00
Fabio Alessandrelli
267b3746c5
Sanitize protocol struct, def LWS T/RX buffer size
2018-06-23 20:17:15 +02:00
Fabio Alessandrelli
e56a3c1dc4
Bump libwebsockets to version 3.0.0
2018-06-07 18:07:35 +02:00
Rémi Verschelde
d0811ed3f9
Thirdparty: Fill copyright for lws, miniupnpc, clipper
...
Rename `lws` to `libwebsockets` which is its library name.
Add missing license file for mbedtls.
2018-06-07 10:46:05 +02:00
Fabio Alessandrelli
6cda58a12f
Fix LWSPeer get_connected_[host/port]
2018-06-06 18:34:08 +02:00
Rémi Verschelde
3334209a73
SCons: Pass env to modules can_build method
...
This allows to disable modules based on the environment,
in particular `env[tools]` which tells us if we are
building the editor or not.
2018-05-30 19:11:36 +02:00
Fabio Alessandrelli
dd546dc5b8
Document websocket module, further document enet
2018-05-08 21:15:50 +02:00
Fabio Alessandrelli
03bf783f3c
Various coverity scan fixes for networking
...
Fix FreeBSD websocket compilation error
2018-04-21 15:36:41 +02:00
Fabio Alessandrelli
6b9ec810c6
Implement get_peer_[address|port] in ENet/WSServer
...
Also implement get_connected_host and get_connected_port in WebSocketPeer
(not supported in HTML5 due to browser limitation).
Add shorthand disconnect_peer(id) for get_peer(id)->close() like in ENet to
WebSocketServer.
2018-04-12 12:30:51 +02:00
Fabio Alessandrelli
2e078142a0
Websocket client SSL support
2018-04-03 20:13:57 +02:00
Poommetee Ketson
ff070de986
s/2017/2018/g for gles2, websocket, linux appdata
2018-03-21 16:07:51 +07:00
Fabio Alessandrelli
982fa59126
Remove unneeded and problematic minilex.c from lws.
...
We don't need it, it's used upstream to test the lexical parser
2018-03-01 16:43:42 +01:00
Fabio Alessandrelli
659c62ee33
Use Prepend instead of Append for mbedTLS include
...
Fixes build on FreeBSD when system-wide mbedTLS and/or openSSL are installed
2018-02-28 20:02:16 +01:00
luz.paz
612ab4bbc6
Fix typos with codespell
...
Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt`
Whitelist consists of:
```
ang
doubleclick
lod
nd
que
te
unselect
```
2018-02-21 19:46:06 +01:00
George Marques
a2ef49f8b9
Websocket module properly recognize UWP (by @vnen)
2018-02-20 15:11:50 +01:00
Fabio Alessandrelli
bd3c27ba78
Allow building with system wide mbedtls on X11
...
Using builtin_mbedtls=yes is still the default as many distributions
do not ship with mbedtls included.
2018-02-14 01:34:25 +01:00
Fabio Alessandrelli
34b9fc3022
lws module now uses mbedtls as OpenSSL replacement
2018-02-14 01:26:23 +01:00
Fabio Alessandrelli
658d71c3b9
Relicense module to the wondeful Godot community!
2018-02-06 14:10:13 +01:00
Fabio Alessandrelli
6a644d3ee1
Add websocket module.
...
Webassembly is client-only for obvious reasons.
Other platforms support both client and server using libwebsockets.
2018-02-06 14:10:13 +01:00