summaryrefslogtreecommitdiff
path: root/modules/websocket/wsl_peer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/websocket/wsl_peer.cpp')
-rw-r--r--modules/websocket/wsl_peer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/websocket/wsl_peer.cpp b/modules/websocket/wsl_peer.cpp
index 08079145e4..ff32e83dc1 100644
--- a/modules/websocket/wsl_peer.cpp
+++ b/modules/websocket/wsl_peer.cpp
@@ -43,10 +43,10 @@ String WSLPeer::generate_key() {
// Random key
RandomNumberGenerator rng;
rng.set_seed(OS::get_singleton()->get_unix_time());
- PoolVector<uint8_t> bkey;
+ Vector<uint8_t> bkey;
int len = 16; // 16 bytes, as per RFC
bkey.resize(len);
- PoolVector<uint8_t>::Write w = bkey.write();
+ uint8_t *w = bkey.ptrw();
for (int i = 0; i < len; i++) {
w[i] = (uint8_t)rng.randi_range(0, 255);
}
@@ -260,10 +260,10 @@ Error WSLPeer::get_packet(const uint8_t **r_buffer, int &r_buffer_size) {
return ERR_UNAVAILABLE;
int read = 0;
- PoolVector<uint8_t>::Write rw = _packet_buffer.write();
- _in_buffer.read_packet(rw.ptr(), _packet_buffer.size(), &_is_string, read);
+ uint8_t *rw = _packet_buffer.ptrw();
+ _in_buffer.read_packet(rw, _packet_buffer.size(), &_is_string, read);
- *r_buffer = rw.ptr();
+ *r_buffer = rw;
r_buffer_size = read;
return OK;