]>
Commit | Line | Data |
---|---|---|
282113ba | 1 | /* transport.h |
56797078 | 2 | |
1dcd520b | 3 | Copyright 2001, 2002, 2003, 2004 Red Hat Inc. |
56797078 CV |
4 | |
5 | Written by Robert Collins <rbtcollins@hotmail.com> | |
6 | ||
7 | This file is part of Cygwin. | |
8 | ||
9 | This software is a copyrighted work licensed under the terms of the | |
10 | Cygwin license. Please consult the file "CYGWIN_LICENSE" for | |
11 | details. */ | |
12 | ||
282113ba CV |
13 | #ifndef _TRANSPORT_H |
14 | #define _TRANSPORT_H | |
56797078 CV |
15 | |
16 | class transport_layer_base *create_server_transport (); | |
17 | ||
18 | class transport_layer_base | |
19 | { | |
20 | public: | |
21 | #ifndef __INSIDE_CYGWIN__ | |
22 | virtual int listen () = 0; | |
23 | virtual class transport_layer_base *accept (bool *recoverable) = 0; | |
24 | #endif | |
25 | ||
26 | virtual void close () = 0; | |
27 | virtual ssize_t read (void *buf, size_t len) = 0; | |
28 | virtual ssize_t write (void *buf, size_t len) = 0; | |
29 | virtual int connect () = 0; | |
30 | ||
31 | #ifndef __INSIDE_CYGWIN__ | |
282113ba CV |
32 | virtual bool impersonate_client (); |
33 | virtual bool revert_to_self (); | |
56797078 CV |
34 | #endif |
35 | ||
8c976716 | 36 | virtual ~transport_layer_base (); |
56797078 CV |
37 | }; |
38 | ||
282113ba | 39 | #endif /* _TRANSPORT_H */ |