about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--docs/api.md68
-rw-r--r--example/src/main.c4
2 files changed, 27 insertions, 45 deletions
diff --git a/docs/api.md b/docs/api.md
index a1a58e8..4a1a80b 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -1,49 +1,31 @@
 # uv_link_t
 
-## Types
-
-### uv_link_t
+## uv_link_t
 
 The base unit of all APIs. Pointer to this structure is what needs to be passed
 to the most of the methods.
 
-### uv_link_methods_t
-
-TODO(indutny)
-
-### uv_link_source_t
-
-TODO(indutny)
-
-### uv_link_observer_t
-
-TODO(indutny)
-
-## Methods
-
-### uv_link_t
-
-#### int uv_link_init(...)
-#### void uv_link_close(...)
-#### int uv_link_chain(...)
-#### int uv_link_unchain(...)
-#### void uv_link_propagate_alloc_cb(...)
-#### void uv_link_propagate_read_cb(...)
-#### int uv_link_propagate_write(...)
-#### int uv_link_propagate_shutdown(...)
-#### void uv_link_propagate_close(...)
-#### int uv_link_read_start(...)
-#### int uv_link_read_stop(...)
-#### int uv_link_write(...)
-#### int uv_link_try_write(...)
-#### int uv_link_shutdown(...)
-
-### uv_link_source_t
-
-#### int uv_link_source_init(...)
-#### int uv_link_observer_init(...)
-
-### uv_link_observer_t
-
-#### int uv_link_observer_init(...)
-#### .observer_read_cb
+### int uv_link_init(...)
+### void uv_link_close(...)
+### int uv_link_chain(...)
+### int uv_link_unchain(...)
+### void uv_link_propagate_alloc_cb(...)
+### void uv_link_propagate_read_cb(...)
+### int uv_link_propagate_write(...)
+### int uv_link_propagate_shutdown(...)
+### void uv_link_propagate_close(...)
+### int uv_link_read_start(...)
+### int uv_link_read_stop(...)
+### int uv_link_write(...)
+### int uv_link_try_write(...)
+### int uv_link_shutdown(...)
+
+## uv_link_source_t
+
+### int uv_link_source_init(...)
+### int uv_link_observer_init(...)
+
+## uv_link_observer_t
+
+### int uv_link_observer_init(...)
+### .observer_read_cb
diff --git a/example/src/main.c b/example/src/main.c
index 215a35a..981c414 100644
--- a/example/src/main.c
+++ b/example/src/main.c
@@ -38,7 +38,7 @@ static void read_cb(uv_link_observer_t* observer,
 
   if (nread < 0) {
     fprintf(stderr, "error or close\n");
-    uv_link_close(&observer->link, close_cb);
+    uv_link_close((uv_link_t*) observer, close_cb);
     return;
   }
 
@@ -60,7 +60,7 @@ static void connection_cb(uv_stream_t* s, int status) {
   CHECK(uv_link_observer_init(&client->observer));
   CHECK(uv_link_chain(&client->middle, (uv_link_t*) &client->observer));
 
-  client->observer.read_cb = read_cb;
+  client->observer.observer_read_cb = read_cb;
   client->observer.data = client;
 
   CHECK(uv_link_read_start((uv_link_t*) &client->observer));