about summary refs log tree commit diff stats
path: root/docs
diff options
context:
space:
mode:
authorFedor Indutny <fedor@indutny.com>2016-05-31 20:34:14 -0400
committerFedor Indutny <fedor@indutny.com>2016-05-31 20:34:14 -0400
commit087b8ef36bea5f6225e4b4a2c0119ba05a489641 (patch)
tree2df54ccca7499f0084373da2d072a4e50308dc59 /docs
parent7d91a2ddcb97dc64ed3bc516829dc00d0f010754 (diff)
downloaduv_link_t-087b8ef36bea5f6225e4b4a2c0119ba05a489641.tar.gz
api: default method implementations
Diffstat (limited to 'docs')
-rw-r--r--docs/api.md36
1 files changed, 36 insertions, 0 deletions
diff --git a/docs/api.md b/docs/api.md
index 1779a94..d1860a0 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -269,6 +269,42 @@ pointers to the functions.
 
 Must be provided to [`uv_link_init()`][].
 
+These functions could be used as a default implementations of
+`uv_link_methods_t` callbacks:
+
+```c
+int uv_link_default_read_start(uv_link_t* link);
+int uv_link_default_read_stop(uv_link_t* link);
+int uv_link_default_write(uv_link_t* link,
+                          uv_link_t* source,
+                          const uv_buf_t bufs[],
+                          unsigned int nbufs,
+                          uv_stream_t* send_handle,
+                          uv_link_write_cb cb,
+                          void* arg);
+int uv_link_default_try_write(uv_link_t* link,
+                              const uv_buf_t bufs[],
+                              unsigned int nbufs);
+int uv_link_default_shutdown(uv_link_t* link,
+                             uv_link_t* source,
+                             uv_link_shutdown_cb cb,
+                             void* arg);
+void uv_link_default_close(uv_link_t* link, uv_link_t* source,
+                           uv_link_close_cb cb);
+```
+
+These maybe used for [`uv_methods_talloc_cb_override`][] and
+[`uv_methods_t.read_cb_override`][].
+
+```c
+void uv_link_default_alloc_cb(uv_link_t* link,
+                              size_t suggested_size,
+                              uv_buf_t* buf);
+void uv_link_default_read_cb(uv_link_t* link,
+                             ssize_t nread,
+                             const uv_buf_t* buf);
+```
+
 ### .read_start
 
 ```c