diff options
author | tomsmeding <tom.smeding@gmail.com> | 2017-04-15 16:05:28 +0200 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2017-04-15 16:05:28 +0200 |
commit | 3b3f2f3168c80e53055891f9afcfc5c5120dabd7 (patch) | |
tree | 415c701933364f283f8eadac1bb0e0543f9fb97f /net.c | |
parent | 9800ecb1e93d398988a6904d5e4dc6c4e11aedb0 (diff) |
server: Support cmd_is_online
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); |