src/sock.c
changeset 12 4147fae232d9
parent 11 14e79683c48c
child 28 9c1050bc8709
--- a/src/sock.c	Sat Feb 28 17:39:37 2009 +0200
+++ b/src/sock.c	Sat Feb 28 18:48:10 2009 +0200
@@ -74,3 +74,12 @@
     // return pointer
     return SOCK_ERR(sock);
 }
+
+void sock_stream_invoke_callbacks (struct sock_stream *sock, short what)
+{
+    if (what & EV_READ && sock->cb_info->on_read)
+        sock->cb_info->on_read(sock, sock->cb_arg);
+
+    if (what & EV_WRITE && sock->cb_info->on_write)
+        sock->cb_info->on_read(sock, sock->cb_arg);
+}