diff options
Diffstat (limited to 'net.c')
-rw-r--r-- | net.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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; +} |