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-08 14:54:10 +0300
committerCorinna Vinschen <corinna@vinschen.de>2002-02-08 14:54:10 +0300
commitfae28904e9bc81e39a14ff0bd3a35c955ba67001 (patch)
tree3f9f016ce356cb48bd0be5ecc7eb10a3652e68ed /winsup/cygwin/fhandler.h
parent9f25eed9c96cb37ee58fcb65aafb44f9c6183dde (diff)
* dtable.cc (dtable::dup2): Store fd for fhandler_socket.
* fhandler.h (fhandler_base::set_fd): New virtual method. (fhandler_base::get_fd): Ditto. (fhandler_socket::set_fd): Ditto. (fhandler_socket::get_fd): Ditto. * fhandler_socket.cc (fhandler_socket::read): Call cygwin_recv instead of native Winsock recv. (fhandler_socket::write): Call cygwin_send instead of native Winsock send. * net.cc (fdsock): Store fd in fhandler_socket.
Diffstat (limited to 'winsup/cygwin/fhandler.h')
-rw-r--r--winsup/cygwin/fhandler.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index 039615d4d..f2b3f1387 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -351,6 +351,9 @@ class fhandler_base
virtual void seekdir (DIR *, off_t);
virtual void rewinddir (DIR *);
virtual int closedir (DIR *);
+
+ virtual void set_fd (int nfd) {}
+ virtual int get_fd () { return -1; }
};
class fhandler_socket: public fhandler_base
@@ -361,6 +364,7 @@ class fhandler_socket: public fhandler_base
HANDLE secret_event;
struct _WSAPROTOCOL_INFOA *prot_info_ptr;
char *sun_path;
+ int fd;
public:
fhandler_socket ();
@@ -391,8 +395,10 @@ class fhandler_socket: public fhandler_base
select_record *select_read (select_record *s);
select_record *select_write (select_record *s);
select_record *select_except (select_record *s);
- int get_addr_family () {return addr_family;}
+ void set_fd (int nfd) { fd = nfd; }
+ int get_fd () { return fd; }
void set_addr_family (int af) {addr_family = af;}
+ int get_addr_family () {return addr_family;}
void set_sun_path (const char *path);
char *get_sun_path () {return sun_path;}
void set_connect_secret ();