about summary refs log tree commit diff stats
path: root/include/uv_link_t.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/uv_link_t.h')
-rw-r--r--include/uv_link_t.h38
1 files changed, 14 insertions, 24 deletions
diff --git a/include/uv_link_t.h b/include/uv_link_t.h
index 5e77e34..34c7760 100644
--- a/include/uv_link_t.h
+++ b/include/uv_link_t.h
@@ -64,6 +64,7 @@ struct uv_link_methods_s {
     uv_link_read_cb saved_read_cb;                                            \
                                                                               \
     /* Private, used for close */                                             \
+    int close_depth;                                                          \
     int close_waiting;                                                        \
     uv_link_close_cb saved_close_cb;
 
@@ -85,32 +86,23 @@ UV_EXTERN void uv_link_propagate_read_cb(uv_link_t* link,
                                          ssize_t nread,
                                          const uv_buf_t* buf);
 
-static int uv_link_propagate_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) {
-  return link->methods->write(link, source, bufs, nbufs, send_handle, cb, arg);
-}
+int uv_link_propagate_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);
 
-static int uv_link_propagate_shutdown(uv_link_t* link,
-                                      uv_link_t* source,
-                                      uv_link_shutdown_cb cb,
-                                      void* arg) {
-  return link->methods->shutdown(link, source, cb, arg);
-}
+int uv_link_propagate_shutdown(uv_link_t* link,
+                               uv_link_t* source,
+                               uv_link_shutdown_cb cb,
+                               void* arg);
 
 void uv_link_propagate_close(uv_link_t* link, uv_link_t* source,
                              uv_link_close_cb cb);
 
 /* Use this to invoke methods of `link` */
 
-static int uv_link_read_start(uv_link_t* link) {
-  return link->methods->read_start(link);
-}
-
-static int uv_link_read_stop(uv_link_t* link) {
-  return link->methods->read_stop(link);
-}
+int uv_link_read_start(uv_link_t* link);
+int uv_link_read_stop(uv_link_t* link);
 
 static int uv_link_write(uv_link_t* link, const uv_buf_t bufs[],
                          unsigned int nbufs, uv_stream_t* send_handle,
@@ -118,11 +110,9 @@ static int uv_link_write(uv_link_t* link, const uv_buf_t bufs[],
   return uv_link_propagate_write(link, link, bufs, nbufs, send_handle, cb, arg);
 }
 
-static int uv_link_try_write(uv_link_t* link,
-                             const uv_buf_t bufs[],
-                             unsigned int nbufs) {
-  return link->methods->try_write(link, bufs, nbufs);
-}
+int uv_link_try_write(uv_link_t* link,
+                      const uv_buf_t bufs[],
+                      unsigned int nbufs);
 
 static int uv_link_shutdown(uv_link_t* link, uv_link_shutdown_cb cb,
                             void* arg) {