]>
Commit | Line | Data |
---|---|---|
282113ba | 1 | /* transport.cc |
f449bfef | 2 | |
1dcd520b | 3 | Copyright 2001, 2002, 2003, 2004 Red Hat Inc. |
f449bfef RC |
4 | |
5 | Written by Robert Collins <rbtcollins@hotmail.com> | |
6 | ||
1c001dd2 | 7 | This file is part of Cygwin. |
f449bfef | 8 | |
1c001dd2 CS |
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 | ||
13 | /* to allow this to link into cygwin and the .dll, a little magic is needed. */ | |
14 | #ifdef __OUTSIDE_CYGWIN__ | |
15 | #include "woutsup.h" | |
16 | #else | |
17 | #include "winsup.h" | |
18 | #endif | |
f449bfef | 19 | |
f449bfef | 20 | #include <sys/socket.h> |
1c001dd2 | 21 | |
282113ba CV |
22 | #include "transport.h" |
23 | #include "transport_pipes.h" | |
24 | #include "transport_sockets.h" | |
f449bfef | 25 | |
f449bfef | 26 | /* The factory */ |
1c001dd2 CS |
27 | transport_layer_base * |
28 | create_server_transport () | |
f449bfef | 29 | { |
f449bfef | 30 | if (wincap.is_winnt ()) |
282113ba | 31 | return new transport_layer_pipes; |
f449bfef | 32 | else |
282113ba | 33 | return new transport_layer_sockets; |
f449bfef RC |
34 | } |
35 | ||
1c001dd2 | 36 | #ifndef __INSIDE_CYGWIN__ |
f449bfef | 37 | |
282113ba | 38 | bool |
f449bfef | 39 | transport_layer_base::impersonate_client () |
282113ba CV |
40 | { |
41 | return true; | |
42 | } | |
f449bfef | 43 | |
282113ba | 44 | bool |
f449bfef | 45 | transport_layer_base::revert_to_self () |
282113ba CV |
46 | { |
47 | return true; | |
48 | } | |
1c001dd2 CS |
49 | |
50 | #endif /* !__INSIDE_CYGWIN__ */ | |
8c976716 CV |
51 | |
52 | transport_layer_base::~transport_layer_base () | |
53 | {} |