aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client.cpp1
-rw-r--r--src/client.h16
2 files changed, 17 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 24f9bfb..729526e 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -85,6 +85,7 @@ void Bu::Client::processOutput()
85 { 85 {
86 int nAmnt = (sWriteBuf.getSize()<2048)?(sWriteBuf.getSize()):(2048); 86 int nAmnt = (sWriteBuf.getSize()<2048)?(sWriteBuf.getSize()):(2048);
87 int nReal = pTopStream->write( sWriteBuf.getStr(), nAmnt ); 87 int nReal = pTopStream->write( sWriteBuf.getStr(), nAmnt );
88 pTopStream->flush();
88 sWriteBuf.trimFront( nReal ); 89 sWriteBuf.trimFront( nReal );
89 //sWriteBuf.clear(); 90 //sWriteBuf.clear();
90 } 91 }
diff --git a/src/client.h b/src/client.h
index 7ba1ac5..72b1b05 100644
--- a/src/client.h
+++ b/src/client.h
@@ -73,6 +73,22 @@ namespace Bu
73 pTopStream = pFlt; 73 pTopStream = pFlt;
74 lFilts.prepend( pFlt ); 74 lFilts.prepend( pFlt );
75 } 75 }
76
77 template<typename filter, typename p1t>
78 void pushFilter( p1t p1 )
79 {
80 filter *pFlt = new filter( *pTopStream, p1 );
81 pTopStream = pFlt;
82 lFilts.prepend( pFlt );
83 }
84
85 template<typename filter, typename p1t, typename p2t>
86 void pushFilter( p1t p1, p2t p2 )
87 {
88 filter *pFlt = new filter( *pTopStream, p1, p2 );
89 pTopStream = pFlt;
90 lFilts.prepend( pFlt );
91 }
76 92
77 private: 93 private:
78 typedef Bu::List<Bu::Stream *> FilterList; 94 typedef Bu::List<Bu::Stream *> FilterList;