1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 #if !defined(UVUTIL_H)
21 # define UVUTIL_H
22
23 struct uv_access_s
24 {
25 uv_loop_t * loop;
26 int port;
27 char * address;
28 # define PW_SIZE 128
29 char pw[PW_SIZE + 1];
30 char pwBuffer[PW_SIZE + 1];
31 int pwPos;
32
33 void (* connectPrompt) (uv_tcp_t * client);
34 void (* connected) (uv_tcp_t * client);
35 bool open;
36 uv_tcp_t server;
37 uv_tcp_t * client;
38 bool useTelnet;
39 void * telnetp;
40 bool loggedOn;
41 unsigned char * inBuffer;
42 uint inSize;
43 uint inUsed;
44 };
45
46 typedef struct uv_access_s uv_access;
47 void accessStartWriteStr (uv_tcp_t * client, char * data);
48 void uv_open_access (uv_access * access);
49 # if !defined(QUIET_UNUSED)
50 void accessPutStr (uv_access * access, char * str);
51 void accessPutChar (uv_access * access, char ch);
52 # endif
53 int accessGetChar (uv_access * access);
54 void accessStartWrite (uv_tcp_t * client, char * data, ssize_t datalen);
55 void accessCloseConnection (uv_stream_t* stream);
56 #endif