Commit graph

395 commits

Author SHA1 Message Date
Rémi Verschelde
391e46830f doc: Sync classref with current source
Fix various missing arguments in bindings.
2018-07-26 11:56:21 +02:00
Hein-Pieter van Braam
0e29f7974b Reduce unnecessary COW on Vector by make writing explicit
This commit makes operator[] on Vector const and adds a write proxy to it.  From
now on writes to Vectors need to happen through the .write proxy. So for
instance:

Vector<int> vec;
vec.push_back(10);
std::cout << vec[0] << std::endl;
vec.write[0] = 20;

Failing to use the .write proxy will cause a compilation error.

In addition COWable datatypes can now embed a CowData pointer to their data.
This means that String, CharString, and VMap no longer use or derive from
Vector.

_ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug
builds. This is a lot faster for Vector in the editor and while running tests.
The reason why this difference used to exist is because force-inlined methods
used to give a bad debugging experience. After extensive testing with modern
compilers this is no longer the case.
2018-07-26 00:54:16 +02:00
Rémi Verschelde
12d69ef53e Fix loading PO files with missing newline after last msgstr
Fixes #20375.
2018-07-24 13:32:37 +02:00
Fabio Alessandrelli
9ba8f0d2d8 HTTP client now uses non blocking handshake 2018-07-16 13:08:17 +02:00
Fabio Alessandrelli
99d0b7ba14 Implement non blocking-handshake for StreamPeerSSL 2018-07-16 13:08:17 +02:00
Fabio Alessandrelli
e82f0fefbc MultiplayerAPI::send_bytes transfer mode support.
Added as extra parameter, allow you to specify which transfer mode to
use for those specific bytes
2018-07-08 09:47:22 +02:00
GagaPete
8a4dccc4ce Fix CORS problems due to added headers on JS target
Before this change, missing User-Agent and Accept headers were automatically
added on all platforms. Setting the User-Agent header forces the browser to
do a CORS preflight (see 1) which fails if the HTTP endpoint is not
configured appropriate. It's not neccesary to set either header as the
browser sets them and so this commit disables that functionality on the JS
target.

1: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Simple_requests
2018-07-04 01:56:44 +02:00
Michael Alexsander Silva Dias
1971baf8a9 Fixed regression making the logger not respect the max files limit. 2018-06-12 12:57:48 -03:00
Michael Alexsander Silva Dias
cf9520ba2e Don't add a period to a log file name if it has no extension. 2018-05-30 11:31:29 -03:00
Fabio Alessandrelli
4524153b6e New sync RPC modes to match all combinations 2018-05-29 20:26:41 +02:00
Fabio Alessandrelli
1400f6fdc4 Refactor RPCMode enum and checks 2018-05-29 20:26:41 +02:00
Max Hilbrunner
4c69a495c9
Revert "RPCMode refactor, more sync modes" 2018-05-29 11:47:52 +02:00
Max Hilbrunner
d0b62ce155
Merge pull request #19021 from Faless/rpc_sync_fix
RPCMode refactor, more sync modes
2018-05-29 09:44:03 +02:00
Fabian
1065f06eef Fix for not picking up locale of some .po translation files 2018-05-28 12:51:05 +09:30
Max Hilbrunner
130fd6bcb8
Merge pull request #18279 from RandomShaper/allow-naive-http
Allow body-up-to-EOF HTTP responses
2018-05-26 19:58:39 +02:00
Fabio Alessandrelli
19ba3d5da3 New sync RPC modes to match all combinations 2018-05-26 10:43:43 +02:00
Fabio Alessandrelli
9de4ffde61 Refactor RPCMode enum and checks 2018-05-26 10:43:43 +02:00
Pedro J. Estébanez
2587fcccee Allow body-up-to-EOF HTTP responses
Implements the same heuristic as Curl (and web browsers): if no `Content-Length`, no `Connection: keep-alive` and no chunked transfer encoding, assume th rest of the data until EOF is the body, gracefully setting the HTTP client back to the disconnected state.

Theoretically, this is not compliant with HTTP 1.1, by which `keep-alive` is the default, but in practice, an explicit header is sent by servers.
2018-05-22 15:08:31 +02:00
Guilherme Felipe
35024d4e7b Add missing copyright headers 2018-05-16 14:50:44 -03:00
Fabio Alessandrelli
c7466eb144 Allow sending raw bytes through MultiplayerAPI 2018-05-12 23:17:24 +02:00
Max Hilbrunner
e744d12e56
Merge pull request #18709 from Faless/multiplayer_docs
Rename multiplayer_api to multiplayer, add docs
2018-05-09 01:41:01 +02:00
Juan Linietsky
06b076f687
Merge pull request #15305 from poke1024/checks-peer
Checks on input_buffer in PacketPeerStream
2018-05-08 10:45:39 -03:00
Fabio Alessandrelli
e391b493d5 Internal methods in MultiplayerAPI start with _ 2018-05-08 14:46:52 +02:00
Juan Linietsky
cbd849d13f
Merge pull request #16033 from poke1024/marshalls-dict
Detects crash-related marshalling errors due to NAN values
2018-05-07 17:51:06 -03:00
Rémi Verschelde
f86a67c4d1
Merge pull request #18520 from paulloz/gdscript-api-string-path
fix API string path
2018-05-02 10:36:25 +02:00
Paul Joannon
a35c8bbdc7 fix API string path 2018-04-30 09:38:18 +02:00
Max Hilbrunner
a3aa5ad0d0 PCKPacker:pck_start(): Update version 2018-04-19 00:45:22 +02:00
Pedro J. Estébanez
00e98458ba Revert "Unify http- and percent- encode/decode"
This reverts commit b76ee30917.
2018-04-12 21:12:34 +02:00
Juan Linietsky
e9e5aa617e
Merge pull request #17227 from Faless/multiplayer_api
[RFC] MultiplayerAPI refactor
2018-04-08 11:04:16 -03:00
Juan Linietsky
cd7e9d9642
Merge pull request #17583 from RandomShaper/enhance-uri-utils
Enhance uri utils
2018-04-07 17:07:29 -03:00
Juan Linietsky
5a1a90c3db
Merge pull request #17636 from rainerdeyke/fix_issue_17585
Fixes moving files causes scene corruption
2018-04-07 16:56:02 -03:00
Fabio Alessandrelli
490dd9f946 Generalize SSL cert reading from file 2018-04-03 20:13:57 +02:00
Pedro J. Estébanez
8d8e9d54c8 Enhance HTTPClient.query_string_from_dict() 2018-03-27 19:18:32 +02:00
Pedro J. Estébanez
b76ee30917 Unify http- and percent- encode/decode
There was a percent-prefixed version, which was exposed, and a http-prefixed version which was not (only to GDNative).
This commit keeps the percent-prefixed versions, but with the http-prefixed implementations.
2018-03-27 19:18:30 +02:00
Rainer Deyke
31c6d6649f Fixes scene corruption when updating dependencies.
This commit fixes issue #17585: renaming/moving resources can corrupt
scene files.  The corruption was caused by
'ResourceFormatLoaderBinary::rename_dependencies' updating the file
format version field of the affected scene file to the latest version
without actually updating the content of the file to that version,
resulting in a file whose content does not match its file format version
field.  The fix preserves the file format version field and the engine
version fields when renaming dependencies.
2018-03-24 15:08:55 +01:00
Pedro J. Estébanez
536611704a Fix listing files inside directory in pack file
When adding a directory path to the inventory of the pack, an empty file name was being added to the file list. That made `Directory.get_ntext()` signal end-of-list too early so that files in a subdirectory were missed.

Fixes #15801.
Helps with #16798.
2018-03-18 14:04:50 +01:00
Fabio Alessandrelli
b0186b41bb
Merge pull request #17237 from RandomShaper/fix-ssl-handshake
Fix HTTPClient SNI support when verify is off
2018-03-15 22:43:34 +01:00
Andrew Dunai
0269e366f1 Fix garbage in string padding. 2018-03-04 19:45:33 +02:00
Pedro J. Estébanez
602da6fa4f Fix wrong SSL handshake
The name of the remote host is passed to mbed TLS in all cases so the client hello message is correctly formed.
2018-03-04 01:22:59 +01:00
Fabio Alessandrelli
df391cc5be Add new MultiplayerAPI class
Handles all the high level networking stuff
2018-03-03 18:28:49 +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
Artem Varaksa
d35e486228 Clean up some bad words from code comments 2018-02-17 16:00:39 +03:00
Rémi Verschelde
b48cc669e2
Merge pull request #16169 from hungrymonkey/issue_16160
Change function signature from float to double to match type get_doub…
2018-02-14 15:50:47 +01:00
Fabio Alessandrelli
67b600d957 Add mbedtls module 2018-02-14 01:26:23 +01:00
Marlon Henry Schweigert
87adf9cfba Display set_nodelay to GDScript
Pass enabled arg

Rename set_nodelay to set_no_delay

Add description to the method

Change description
2018-01-30 13:22:15 -02:00
hungrymonkey
d2f1c87063 Change function signature from float to double to match type get_doubleCloses #16160 2018-01-29 15:45:46 -08:00
Bernhard Liebl
eb1f9375ea Detects crash-related marshalling errors due to NAN values 2018-01-24 19:24:18 +01:00
Rémi Verschelde
9f479f096c Fix typos in code and docs with codespell
Using v1.11.0 from https://github.com/lucasdemarchi/codespell
2018-01-18 22:01:42 +01:00
Rémi Verschelde
6c46787749 doc: Replace some more "val" with "value" + sync 2018-01-17 10:43:23 +01:00
Paul Joannon
e08b6c9a9c fix set_stream_peer binding in PacketPeer 2018-01-12 14:25:05 +01:00