--- lbbs/src/netio.c 2004/10/19 03:28:44 1.1 +++ lbbs/src/netio.c 2004/10/21 17:28:46 1.2 @@ -28,6 +28,16 @@ s_getc(int socket) } int +s_putc(int socket, char c) +{ + int ret; + + ret = send (socket, &c, 1, 0); + + return ret; +} + +int s_receive(int socket, char* buffer, int buffer_length, char end_str[]) { char buf_str[2048]; @@ -65,8 +75,12 @@ s_receive(int socket, char* buffer, int int s_send(int socket, const char* in_str) { + int ret; + if (in_str != NULL && strlen(in_str) > 0) { - send(socket, in_str, strlen(in_str), 0); + ret = send(socket, in_str, strlen(in_str), 0); } + + return ret; }