From 5f2c95f9116f24ecd64b6361b6e22ce983732997 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 8 Jun 2011 05:37:45 +0000 Subject: Hopefully nobody was using the buffer size parameter, if so, it's moved. Buffer now takes an extra parameter: what to buffer, read, write, or both. This winds up being important when dealing with blocking sockets and the like. --- src/buffer.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/buffer.h') diff --git a/src/buffer.h b/src/buffer.h index 17c6d73..91ec9c2 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -15,9 +15,16 @@ namespace Bu class Buffer : public Bu::Filter { public: - Buffer( Bu::Stream &rNext, int iBufSize=4096 ); + Buffer( Bu::Stream &rNext, int iWhat=Both, int iBufSize=4096 ); virtual ~Buffer(); + enum + { + Write = 1, + Read = 2, + Both = 3 + }; + virtual void start(); virtual Bu::size stop(); @@ -44,6 +51,7 @@ namespace Bu int iReadPos; int iWriteBufFill; int iWritePos; + int iWhat; }; }; -- cgit v1.2.3