Function recvBufferSize

Summary

#include <src/uvw/handle.hpp>

(1) int recvBufferSize()

(2) bool recvBufferSize(int value)

Function overload

Synopsis

#include <src/uvw/handle.hpp>

int recvBufferSize()

Description

Gets the size of the receive buffer used for the socket.

Gets the size of the receive buffer that the operating system uses for the socket.
This function works for TCPHandle, PipeHandle and UDPHandle handles on Unix and for TCPHandle and UDPHandle handles on Windows.
Note that Linux will return double the size of the original set value.

Returns
The size of the receive buffer, 0 in case of errors.

Source

Lines 224-228 in src/uvw/handle.hpp.

int recvBufferSize() {
    int value = 0;
    auto err = uv_recv_buffer_size(this->template get<uv_handle_t>(), &value);
    return err ? 0 : value;
}

Synopsis

#include <src/uvw/handle.hpp>

bool recvBufferSize(int value)

Description

Sets the size of the receive buffer used for the socket.

Sets the size of the receive buffer that the operating system uses for the socket.
This function works for TCPHandle, PipeHandle and UDPHandle handles on Unix and for TCPHandle and UDPHandle handles on Windows.
Note that Linux will set double the size.

Returns
True in case of success, false otherwise.

Source

Lines 241-243 in src/uvw/handle.hpp.

bool recvBufferSize(int value) {
    return (0 == uv_recv_buffer_size(this->template get<uv_handle_t>(), &value));
}





Add Discussion as Guest

Log in