]> asedeno.scripts.mit.edu Git - PuTTY.git/blob - macnet.h
The "about" box now behaves approximately as it should (though we still don't
[PuTTY.git] / macnet.h
1 /*
2  * macnet.h -- Mac OS networtking stuff for PuTTY
3  */
4
5 #ifndef _PUTTY_MACNET_H
6 #define _PUTTY_MACNET_H
7
8 #include <MacTypes.h>
9 #include <AddressXlation.h>
10 #include <MacTCP.h>
11 #include <Processes.h>
12
13 typedef struct {
14     StreamPtr tcp_stream;
15     struct HostInfo host_info;
16     int port;
17     unsigned char *inbuf;
18     int inbuf_head, inbuf_reap, inbuf_size;
19     unsigned char *outbuf;
20     int outbuf_head, outbuf_reap, outbuf_size;
21     ProcessSerialNumber psn;
22 } Socket;
23
24 typedef Socket *SOCKET
25
26 #define INVALID_SOCKET NULL
27
28 #define MSG_OOB 1
29
30 extern int send(SOCKET, const void *, size_t, int);
31 extern int recv(SOCKET, void *, size_t, int);
32 extern SOCKET tcp_open(const char *, int, char **);
33 extern void tcp_close(SOCKET);
34 extern void tcp_abort(SOCKET);
35
36 #endif
37
38 /*
39  * Local Variables:
40  * c-file-style: "simon"
41  * End:
42  */