summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorNicolas Noble <nnoble@blizzard.com>2013-07-16 16:21:37 -0700
committerNicolas Noble <nnoble@blizzard.com>2013-07-16 16:21:37 -0700
commit71b4710c4834d747e44451bd7806c5ac4effbcc5 (patch)
tree6c9bbba961181c0c1716c41ee016190df25ae53c /includes
parentf8dbc120c055fb61fa79f901cc2974d049d04f4f (diff)
Adding StdIO classes.
Diffstat (limited to 'includes')
-rw-r--r--includes/StdIO.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/includes/StdIO.h b/includes/StdIO.h
new file mode 100644
index 0000000..9b7e362
--- /dev/null
+++ b/includes/StdIO.h
@@ -0,0 +1,40 @@
+#pragma once
+
+#include <Handle.h>
+#include <Selectable.h>
+
+namespace Balau {
+
+// these classes might very well need to have their own
+// special version for win32; at least from a Handle.
+class StdIN : public Selectable {
+ public:
+ StdIN();
+ virtual const char * getName();
+ virtual void close() throw (GeneralException);
+ private:
+ virtual ssize_t recv(int sockfd, void *buf, size_t len, int flags);
+ virtual ssize_t send(int sockfd, const void *buf, size_t len, int flags);
+};
+
+class StdOUT : public Selectable {
+ public:
+ StdOUT();
+ virtual const char * getName();
+ virtual void close() throw (GeneralException);
+ private:
+ virtual ssize_t recv(int sockfd, void *buf, size_t len, int flags);
+ virtual ssize_t send(int sockfd, const void *buf, size_t len, int flags);
+};
+
+class StdERR : public Selectable {
+ public:
+ StdERR();
+ virtual const char * getName();
+ virtual void close() throw (GeneralException);
+ private:
+ virtual ssize_t recv(int sockfd, void *buf, size_t len, int flags);
+ virtual ssize_t send(int sockfd, const void *buf, size_t len, int flags);
+};
+
+};