Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygserver/transport.h')
-rw-r--r--winsup/cygserver/transport.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/winsup/cygserver/transport.h b/winsup/cygserver/transport.h
new file mode 100644
index 000000000..76018d20e
--- /dev/null
+++ b/winsup/cygserver/transport.h
@@ -0,0 +1,39 @@
+/* transport.h
+
+ Copyright 2001, 2002, 2003 Red Hat Inc.
+
+ Written by Robert Collins <rbtcollins@hotmail.com>
+
+This file is part of Cygwin.
+
+This software is a copyrighted work licensed under the terms of the
+Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+details. */
+
+#ifndef _TRANSPORT_H
+#define _TRANSPORT_H
+
+class transport_layer_base *create_server_transport ();
+
+class transport_layer_base
+{
+public:
+#ifndef __INSIDE_CYGWIN__
+ virtual int listen () = 0;
+ virtual class transport_layer_base *accept (bool *recoverable) = 0;
+#endif
+
+ virtual void close () = 0;
+ virtual ssize_t read (void *buf, size_t len) = 0;
+ virtual ssize_t write (void *buf, size_t len) = 0;
+ virtual int connect () = 0;
+
+#ifndef __INSIDE_CYGWIN__
+ virtual bool impersonate_client ();
+ virtual bool revert_to_self ();
+#endif
+
+ virtual ~transport_layer_base ();
+};
+
+#endif /* _TRANSPORT_H */