diff options
Diffstat (limited to 'net.c')
-rw-r--r-- | net.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -27,6 +27,14 @@ bool net_send_ok(int fd,const char *tag){ return closed; } +bool net_send_number(int fd,const char *tag,i64 number){ + char *buf=NULL; + i64 len=asprintf(&buf,"%s number %" PRIi64 "\n",tag,number); + bool closed=net_send_raw_text(fd,buf,len); + free(buf); + return closed; +} + bool net_send_error(int fd,const char *tag,const char *msg){ char *buf=NULL; i64 len=asprintf(&buf,"%s error %s\n",tag,msg); |