| 28 |
} |
} |
| 29 |
|
|
| 30 |
int |
int |
| 31 |
|
s_putc(int socket, char c) |
| 32 |
|
{ |
| 33 |
|
int ret; |
| 34 |
|
|
| 35 |
|
ret = send (socket, &c, 1, 0); |
| 36 |
|
|
| 37 |
|
return ret; |
| 38 |
|
} |
| 39 |
|
|
| 40 |
|
int |
| 41 |
s_receive(int socket, char* buffer, int buffer_length, char end_str[]) |
s_receive(int socket, char* buffer, int buffer_length, char end_str[]) |
| 42 |
{ |
{ |
| 43 |
char buf_str[2048]; |
char buf_str[2048]; |
| 75 |
int |
int |
| 76 |
s_send(int socket, const char* in_str) |
s_send(int socket, const char* in_str) |
| 77 |
{ |
{ |
| 78 |
|
int ret; |
| 79 |
|
|
| 80 |
if (in_str != NULL && strlen(in_str) > 0) |
if (in_str != NULL && strlen(in_str) > 0) |
| 81 |
{ |
{ |
| 82 |
send(socket, in_str, strlen(in_str), 0); |
ret = send(socket, in_str, strlen(in_str), 0); |
| 83 |
} |
} |
| 84 |
|
|
| 85 |
|
return ret; |
| 86 |
} |
} |