summaryrefslogtreecommitdiff
path: root/includes/BStdIO.h
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2013-07-24 09:00:09 +0200
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2013-07-24 09:00:09 +0200
commit060d32e8cb595dc142cb735ff3b9d6143473dff9 (patch)
treed313084c24cb543d63944e91242e5ac141104cdc /includes/BStdIO.h
parent71b4710c4834d747e44451bd7806c5ac4effbcc5 (diff)
Updating LuaJIT, and renaming StdIO.h to BStdIO.h
Diffstat (limited to 'includes/BStdIO.h')
-rw-r--r--includes/BStdIO.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/includes/BStdIO.h b/includes/BStdIO.h
new file mode 100644
index 0000000..9b7e362
--- /dev/null
+++ b/includes/BStdIO.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);
+};
+
+};