diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2019-06-24 15:46:24 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2019-07-04 15:03:04 +0200 |
commit | 9e303ef71ce18ffd01ed7a63badf59ea015089c7 (patch) | |
tree | 6144acc2f12312248fa88a39207248b5d3cea4f0 /core/io/stream_peer_tcp.cpp | |
parent | c13be7959439edd03b3fabf8a73a301784bce2b6 (diff) |
WebSocket module now uses wslay library.
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.
Diffstat (limited to 'core/io/stream_peer_tcp.cpp')
-rw-r--r-- | core/io/stream_peer_tcp.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/io/stream_peer_tcp.cpp b/core/io/stream_peer_tcp.cpp index bcdae343b8..a8dd263484 100644 --- a/core/io/stream_peer_tcp.cpp +++ b/core/io/stream_peer_tcp.cpp @@ -217,6 +217,11 @@ Error StreamPeerTCP::read(uint8_t *p_buffer, int p_bytes, int &r_received, bool to_read -= read; total_read += read; + + if (!p_block) { + r_received = total_read; + return OK; + } } } |