Function sendBufferSize

Summary

#include <src/uvw/handle.hpp>

(1) int sendBufferSize()

(2) bool sendBufferSize(int value)

Function overload

Synopsis

#include <src/uvw/handle.hpp>

int sendBufferSize()

Description

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

Gets the size of the send 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 send buffer, 0 in case of errors.

Source

Lines 192-196 in src/uvw/handle.hpp.

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

Synopsis

#include <src/uvw/handle.hpp>

bool sendBufferSize(int value)

Description

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

Sets the size of the send 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 209-211 in src/uvw/handle.hpp.

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





Add Discussion as Guest

Log in