aboutsummaryrefslogtreecommitdiff
path: root/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'net.c')
-rw-r--r--net.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net.c b/net.c
index 8e6644c..e5bdb6b 100644
--- a/net.c
+++ b/net.c
@@ -73,3 +73,11 @@ bool net_send_list(int fd,const char *tag,i64 count,const char **list){
return net_send_raw_text(fd,"\n",1);
}
+
+bool net_send_pong(int fd,const char *tag){
+ char *buf=NULL;
+ i64 len=asprintf(&buf,"%s pong\n",tag);
+ bool closed=net_send_raw_text(fd,buf,len);
+ free(buf);
+ return closed;
+}