summaryrefslogtreecommitdiffstats
path: root/winsup/cygserver/cygserver_transport_sockets.h
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2003-10-22 10:04:11 +0000
committerCorinna Vinschen <corinna@vinschen.de>2003-10-22 10:04:11 +0000
commit567970786e0db398b9c2a990efb9060b95406e12 (patch)
tree568bae70dd6015d558c43737027967520a51888b /winsup/cygserver/cygserver_transport_sockets.h
parent63a823f8f40d4e60eeaaf80570e9991e81c2ef18 (diff)
downloadcygnal-567970786e0db398b9c2a990efb9060b95406e12.tar.gz
cygnal-567970786e0db398b9c2a990efb9060b95406e12.tar.bz2
cygnal-567970786e0db398b9c2a990efb9060b95406e12.zip
Accomodate moving cygserver header files from cygwin/include/cygwin
to here and cygwin dir. * Makefile.in (EXEEXT): Drop as unused. (EXEEXT_FOR_BUILD): Ditto. (all): Don't build libcygserver.a. * cygserver_process.h: Moved from cygwin/include/cygwin to here. * cygserver_transport.h: Ditto. * cygserver_transport_pipes.h: Ditto. * cygserver_transport_sockets.h: Ditto. * ipc.h: Moved to ../cygwin and renamed to cygserver_ipc.h. * shm.h: Moved to ../cygwin and renamed to cygserver_shm.h.
Diffstat (limited to 'winsup/cygserver/cygserver_transport_sockets.h')
-rw-r--r--winsup/cygserver/cygserver_transport_sockets.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/winsup/cygserver/cygserver_transport_sockets.h b/winsup/cygserver/cygserver_transport_sockets.h
new file mode 100644
index 000000000..d960f9c2c
--- /dev/null
+++ b/winsup/cygserver/cygserver_transport_sockets.h
@@ -0,0 +1,46 @@
+/* cygserver_transport_sockets.h
+
+ Copyright 2001, 2002 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 _CYGSERVER_TRANSPORT_SOCKETS_
+#define _CYGSERVER_TRANSPORT_SOCKETS_
+
+#include <sys/socket.h>
+#include <sys/un.h>
+
+class transport_layer_sockets : public transport_layer_base
+{
+public:
+#ifndef __INSIDE_CYGWIN__
+ virtual int listen ();
+ virtual class transport_layer_sockets *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 ();
+
+ transport_layer_sockets ();
+ virtual ~transport_layer_sockets ();
+
+private:
+ /* for socket based communications */
+ int _fd;
+ struct sockaddr_un _addr;
+ socklen_t _addr_len;
+ const bool _is_accepted_endpoint;
+ bool _is_listening_endpoint;
+
+ transport_layer_sockets (int fd);
+};
+
+#endif /* _CYGSERVER_TRANSPORT_SOCKETS_ */