X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fpipe.h;h=71edf7eb3246f125ceb09ccd90495381807c8b85;hp=b67cd79494431f8b05789b5298534e5fbbd65eab;hb=b97d4e9f86e90254ab9edef7ee62a910f6333c78;hpb=49c1f3c3ffdf318579a809f3f800442c0c76c818 diff --git a/source/pipe.h b/source/pipe.h index b67cd79..71edf7e 100644 --- a/source/pipe.h +++ b/source/pipe.h @@ -8,26 +8,31 @@ namespace IO { class Pipe: public Base { -public: - Pipe(); - void set_block(bool); - void close(); - Handle get_event_handle(); - ~Pipe(); private: Handle handle[2]; #ifdef WIN32 OVERLAPPED *overlapped; - Handle event; - unsigned buf_size; - char *buffer; - unsigned buf_avail; - char *buf_next; + Handle event; + unsigned buf_size; + char *buffer; + unsigned buf_avail; + char *buf_next; #endif +public: + Pipe(); + ~Pipe(); + + void close(); + + void set_block(bool); + protected: - unsigned do_write(const char *, unsigned); - unsigned do_read(char *, unsigned); + virtual unsigned do_write(const char *, unsigned); + virtual unsigned do_read(char *, unsigned); + +public: + virtual Handle get_event_handle(); }; } // namespace IO