Drop -Werror
[pmc.git] / mudio.h
bloba93019295301ab7bed8d3bcb1f7e2ba66f63d22d
1 #ifndef _CONNECT_H
2 #define _CONNECT_H
4 /* ipv4 only for now */
6 #define RTT_HIST_LEN 10
8 typedef struct {
9 char *name;
10 char *host;
11 char *input_buffer;
12 char *output_buffer;
13 struct timeval last_send;
14 int port;
15 int sockfd;
16 int flags;
17 #define FL_ECHO 0x1
18 int rtt_hist[RTT_HIST_LEN];
19 int rtt; /* Est. latency in ms */
20 int rtt_idx;
21 } mud_conn_t;
23 mud_conn_t *mud_create(const char *name,
24 const char *host,
25 int port,
26 size_t in_bufsz, size_t out_bufsz);
28 mud_conn_t *mud_connect(const char *name,
29 const char *host,
30 int port,
31 size_t in_bufsz, size_t out_bufsz, int fd);
33 int mud_io(mud_conn_t *mud);
35 #endif