/[LeafOK_CVS]/lbbs/src/netio.c
ViewVC logotype

Diff of /lbbs/src/netio.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 by sysadm, Tue Oct 19 03:28:44 2004 UTC Revision 1.3 by sysadm, Fri Oct 22 15:20:32 2004 UTC
# Line 16  Line 16 
16   ***************************************************************************/   ***************************************************************************/
17    
18  #include "common.h"  #include "common.h"
19    #include <string.h>
20    #include <sys/socket.h>
21    
22  char  char
23  s_getc(int socket)  s_getc(int socket)
# Line 28  s_getc(int socket) Line 30  s_getc(int socket)
30  }  }
31    
32  int  int
33    s_putc(int socket, char c)
34    {
35      int ret;
36      
37      ret = send (socket, &c, 1, 0);
38      
39      return ret;
40    }
41    
42    int
43  s_receive(int socket, char* buffer, int buffer_length, char end_str[])  s_receive(int socket, char* buffer, int buffer_length, char end_str[])
44  {  {
45    char buf_str[2048];    char buf_str[2048];
# Line 65  s_receive(int socket, char* buffer, int Line 77  s_receive(int socket, char* buffer, int
77  int  int
78  s_send(int socket, const char* in_str)  s_send(int socket, const char* in_str)
79  {  {
80      int ret;
81    
82    if (in_str != NULL && strlen(in_str) > 0)    if (in_str != NULL && strlen(in_str) > 0)
83    {    {
84      send(socket, in_str, strlen(in_str), 0);      ret = send(socket, in_str, strlen(in_str), 0);
85    }    }
86      
87      return ret;
88  }  }


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1