-
Notifications
You must be signed in to change notification settings - Fork 144
Expand file tree
/
Copy pathtcp.h
More file actions
43 lines (33 loc) · 1.09 KB
/
tcp.h
File metadata and controls
43 lines (33 loc) · 1.09 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
#include "license_pbs.h" /* See here for the software license */
#ifndef TCP_PBS_H
#define TCP_PBS_H
#include <stddef.h>
#include <time.h>
struct tcpdisbuf
{
unsigned long tdis_bufsize;
char *tdis_leadp;
char *tdis_trailp;
char *tdis_eod;
char *tdis_thebuf;
};
struct tcp_chan
{
struct tcpdisbuf readbuf;
struct tcpdisbuf writebuf;
int IsTimeout; /* (boolean) 1 - true */
int ReadErrno;
int SelectErrno;
int sock;
int reused; /* do_tcp() may call tm_request more than once with the same tcp_chan structure
We need to mark it when it does */
};
int tcp_getc(struct tcp_chan *chan, unsigned int timeout);
int tcp_gets(struct tcp_chan *chan, char *, size_t, unsigned int timeout);
int tcp_puts(struct tcp_chan *chan, const char *, size_t);
int tcp_rcommit(struct tcp_chan *chan, int);
int tcp_wcommit(struct tcp_chan *chan, int);
int tcp_rskip(struct tcp_chan *chan,size_t);
int tcp_chan_has_data(struct tcp_chan *chan);
extern "C" time_t pbs_tcp_timeout;
#endif /* TCP_PBS_H */