a bunch of TODOs

This commit is contained in:
Michele Caini 2016-07-22 17:17:53 +02:00
parent e7b2ac78a7
commit 04ba5d4c86
3 changed files with 10 additions and 0 deletions

View File

@ -91,6 +91,10 @@ public:
std::size_t size() const noexcept {
return uv_handle_size(this->template get<uv_handle_t>()->type);
}
// TODO uv_send_buffer_size
// TODO uv_recv_buffer_size
// TODO uv_fileno
};

View File

@ -28,6 +28,8 @@ public:
bool init(bool ipc = false) { return initialize<uv_pipe_t>(&uv_pipe_init, ipc); }
// TODO uv_pipe_open
void bind(std::string name) {
invoke(&uv_pipe_bind, get<uv_pipe_t>(), name.data());
}

View File

@ -156,6 +156,8 @@ public:
write(data.get(), len);
}
// TODO uv_write2
int tryWrite(char *data, ssize_t len) {
uv_buf_t bufs[] = { uv_buf_init(data, len) };
auto bw = uv_try_write(this->template get<uv_stream_t>(), bufs, 1);
@ -179,6 +181,8 @@ public:
bool writable() const noexcept {
return (uv_is_writable(this->template get<uv_stream_t>()) == 1);
}
// TODO uv_stream_set_blocking
};