Websocket peer outbound buffer fixes. Expose outbound buffered amount.
This commit is contained in:
parent
44012fa61d
commit
de02cf44ae
10 changed files with 56 additions and 4 deletions
|
|
@ -95,7 +95,7 @@ Error EMWSClient::connect_to_host(String p_host, String p_path, uint16_t p_port,
|
|||
return FAILED;
|
||||
}
|
||||
|
||||
static_cast<Ref<EMWSPeer>>(_peer)->set_sock(_js_id, _in_buf_size, _in_pkt_size);
|
||||
static_cast<Ref<EMWSPeer>>(_peer)->set_sock(_js_id, _in_buf_size, _in_pkt_size, _out_buf_size);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
@ -136,6 +136,7 @@ int EMWSClient::get_max_packet_size() const {
|
|||
Error EMWSClient::set_buffers(int p_in_buffer, int p_in_packets, int p_out_buffer, int p_out_packets) {
|
||||
_in_buf_size = nearest_shift(p_in_buffer - 1) + 10;
|
||||
_in_pkt_size = nearest_shift(p_in_packets - 1);
|
||||
_out_buf_size = nearest_shift(p_out_buffer - 1) + 10;
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue