aboutsummaryrefslogtreecommitdiffstats
path: root/libglouglou/libglouglou.c
diff options
context:
space:
mode:
authorLaurent Ghigonis <laurent@p1sec.com>2012-12-02 15:35:31 +0100
committerLaurent Ghigonis <laurent@p1sec.com>2012-12-02 15:35:31 +0100
commitde85285f3e15a779adef18b874cbfea99fd2bcb2 (patch)
tree42b79265a500ea609aa72815fa39c55eb24bc7db /libglouglou/libglouglou.c
parentTODO++ (diff)
downloadglouglou-de85285f3e15a779adef18b874cbfea99fd2bcb2.tar.xz
glouglou-de85285f3e15a779adef18b874cbfea99fd2bcb2.zip
add functions to flush send buffers
Diffstat (limited to 'libglouglou/libglouglou.c')
-rw-r--r--libglouglou/libglouglou.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libglouglou/libglouglou.c b/libglouglou/libglouglou.c
index 090e774..0b0ab48 100644
--- a/libglouglou/libglouglou.c
+++ b/libglouglou/libglouglou.c
@@ -145,6 +145,18 @@ gg_server_send(struct gg_server *srv, struct gg_packet *pkt, struct gg_user *usr
return res;
}
+void
+gg_server_send_flush(struct gg_server *srv, struct gg_user *usr)
+{
+ struct gg_user *u;
+
+ if (usr)
+ sendbuf_flush(usr->sbuf);
+ else
+ LIST_FOREACH(u, &srv->user_list, entry)
+ sendbuf_flush(u->sbuf);
+}
+
/*
* Server - private
*/
@@ -369,6 +381,12 @@ gg_client_send(struct gg_client *cli, struct gg_packet *pkt)
return pkt_encode(pkt, newpkt);
}
+void
+gg_client_send_flush(struct gg_client *cli)
+{
+ sendbuf_flush(cli->sbuf);
+}
+
/*
* Client - private
*/