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/cygwin/include/cygwin/cygserver_transport_pipes.h')
-rwxr-xr-xwinsup/cygwin/include/cygwin/cygserver_transport_pipes.h64
1 files changed, 39 insertions, 25 deletions
diff --git a/winsup/cygwin/include/cygwin/cygserver_transport_pipes.h b/winsup/cygwin/include/cygwin/cygserver_transport_pipes.h
index 9ebeee2a4..4bea2eb13 100755
--- a/winsup/cygwin/include/cygwin/cygserver_transport_pipes.h
+++ b/winsup/cygwin/include/cygwin/cygserver_transport_pipes.h
@@ -1,39 +1,53 @@
-/* cygserver.cc
+/* cygserver_transport_pipes.h
Copyright 2001, 2002 Red Hat Inc.
Written by Robert Collins <rbtcollins@hotmail.com>
- This file is part of Cygwin.
+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. */
+This software is a copyrighted work licensed under the terms of the
+Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+details. */
#ifndef _CYGSERVER_TRANSPORT_PIPES_
#define _CYGSERVER_TRANSPORT_PIPES_
+
/* Named pipes based transport, for security on NT */
class transport_layer_pipes : public transport_layer_base
{
- public:
- virtual void listen ();
- virtual class transport_layer_pipes * accept ();
- virtual void close ();
- virtual ssize_t read (char *buf, size_t len);
- virtual ssize_t write (char *buf, size_t len);
- virtual bool connect();
- virtual void impersonate_client ();
- virtual void revert_to_self ();
- transport_layer_pipes ();
-
- private:
- /* for pipe based communications */
- void init_security ();
- SECURITY_DESCRIPTOR sd;
- SECURITY_ATTRIBUTES sec_none_nih, sec_all_nih;
- char pipe_name [MAX_PATH];
- HANDLE pipe;
- bool inited;
- transport_layer_pipes (HANDLE new_pipe);
+public:
+#ifndef __INSIDE_CYGWIN__
+ virtual int listen ();
+ virtual class transport_layer_pipes *accept (bool *recoverable);
+#endif
+
+ virtual void close ();
+ virtual ssize_t read (void *buf, size_t len);
+ virtual ssize_t write (void *buf, size_t len);
+ virtual int connect ();
+
+#ifndef __INSIDE_CYGWIN__
+ virtual void impersonate_client ();
+ virtual void revert_to_self ();
+#endif
+
+ transport_layer_pipes ();
+ virtual ~transport_layer_pipes ();
+
+private:
+ /* for pipe based communications */
+ void init_security ();
+
+ //FIXME: allow inited, sd, all_nih_.. to be static members
+ SECURITY_DESCRIPTOR _sd;
+ SECURITY_ATTRIBUTES _sec_all_nih;
+ const char *const _pipe_name;
+ HANDLE _hPipe;
+ const bool _is_accepted_endpoint;
+ bool _is_listening_endpoint;
+
+ transport_layer_pipes (HANDLE hPipe);
};
+
#endif /* _CYGSERVER_TRANSPORT_PIPES_ */