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:
authorCorinna Vinschen <corinna@vinschen.de>2002-02-09 13:40:48 +0300
committerCorinna Vinschen <corinna@vinschen.de>2002-02-09 13:40:48 +0300
commitff86860ba629f504f059a1ec8b2c9945accaffc6 (patch)
tree97b365760405c2d544f72b0373badca0d6b53634 /winsup/cygwin/wsock_event.h
parentd0672acc75f1101ed426b4a33426391a8073d9d1 (diff)
* dtable.cc (dtable::dup2): Revert previous patch.
* fhandler.h: Ditto. (fhandler_socket::recv): Define new method. (fhandler_socket::send): Ditto. * fhandler_socket.cc (fhandler_socket::recv): New method. (fhandler_socket::send): Ditto. (fhandler_socket::read): Call fhandler_socket::recv() now. (fhandler_socket::write): Call fhandler_socket::send() now. * net.cc (class wsock_event): Move definition to wsock_event.h. (fdsock): Revert previous patch. (cygwin_recv): Move implementation to fhandler_socket::recv(). (cygwin_send): Move implementation to fhandler_socket::send(). * wsock_event.h: New file.
Diffstat (limited to 'winsup/cygwin/wsock_event.h')
-rw-r--r--winsup/cygwin/wsock_event.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/winsup/cygwin/wsock_event.h b/winsup/cygwin/wsock_event.h
new file mode 100644
index 000000000..3f8638134
--- /dev/null
+++ b/winsup/cygwin/wsock_event.h
@@ -0,0 +1,32 @@
+/* wsock_event.h: Defining the wsock_event class
+
+ Copyright 2002 Red Hat, Inc.
+
+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 __WSOCK_EVENT_H__
+#define __WSOCK_EVENT_H__
+
+class wsock_event
+{
+ WSAEVENT event;
+ WSAOVERLAPPED ovr;
+public:
+ wsock_event () : event (NULL) {};
+ ~wsock_event ()
+ {
+ if (event)
+ WSACloseEvent (event);
+ event = NULL;
+ };
+
+ /* The methods are implemented in net.cc */
+ LPWSAOVERLAPPED prepare ();
+ int wait (int socket, LPDWORD flags);
+};
+
+#endif /* __WSOCK_EVENT_H__ */