aboutsummaryrefslogtreecommitdiffstats
path: root/network.h
blob: 386221a92a64f4c6349f9cb2e093e2c727b7e36c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 * network.h
 */

#ifndef NETWORK_H
#define NETWORK_H 1

#include <stdio.h>

#ifndef WIN32
/* Sane systems */

typedef FILE * netcon_t;
# define fgets_network  fgets
# define fputs_network  fputs
# define fclose_network fclose

#else  /* WIN32 */

struct netcon;
typedef struct netcon *netcon_t;

int fputs_network(const char *, netcon_t);
char *fgets_network(char *, int, netcon_t);
int fclose_network(netcon_t);

#endif /* WIN32 */

netcon_t fopen_network(const char *name, int port, int is_write);

#endif /* NETWORK_H */