brufuse/src/message-io.cpp
/**
 * Allocates memory to be used by libuv while reading.
 */
Allocates memory to be used by libuv while reading.
Allocates memory to be used by libuv while reading .
static void on_alloc(uv_handle_t *handle, size_t suggested_size, uv_buf_t *buf) {
    (void) handle;
    buf->base = new char[suggested_size]{0};
    buf->len = suggested_size;
}
static void on_alloc ( uv_handle_t * handle , size_t suggested_size , uv_buf_t * buf ) { ( void ) handle ; buf -> base = new char [ suggested_size ] { 0 } ; buf -> len = suggested_size ; }
Allocates memory to be used by libuv while reading.
Allocates memory to be used by libuv while reading .