|
Revision 154, 485 bytes
(checked in by malte, 2 years ago)
|
|
|
| Line | |
|---|
| 1 | #ifndef _RECV_LINE_H |
|---|
| 2 | |
|---|
| 3 | #define _RECV_LINE_H |
|---|
| 4 | |
|---|
| 5 | #include <errno.h> |
|---|
| 6 | |
|---|
| 7 | #include <string.h> |
|---|
| 8 | |
|---|
| 9 | #include <stdlib.h> |
|---|
| 10 | |
|---|
| 11 | #include <stdio.h> |
|---|
| 12 | |
|---|
| 13 | #define NO_ERROR 0 |
|---|
| 14 | |
|---|
| 15 | #define MSG_ERROR_SOCKET_RD 10012 |
|---|
| 16 | |
|---|
| 17 | #define MSG_ERROR_SOCKET_EOF 10013 |
|---|
| 18 | |
|---|
| 19 | #define MSG_BYTES_READ 10014 |
|---|
| 20 | |
|---|
| 21 | extern char *message(int message_number); |
|---|
| 22 | |
|---|
| 23 | extern void say(char *format, char *message); |
|---|
| 24 | |
|---|
| 25 | extern int receive_data(int fd, char *dest, size_t n); |
|---|
| 26 | |
|---|
| 27 | int recv_line(int fd, char *dest, size_t n); |
|---|
| 28 | |
|---|
| 29 | #else |
|---|
| 30 | # |
|---|
| 31 | #endif |
|---|