version 3.0
This commit is contained in:
commit
d837490606
209 changed files with 19662 additions and 0 deletions
31
io/sink_filter.h
Normal file
31
io/sink_filter.h
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// File: sink_filter.h //
|
||||
// Description: a filter to write into a target device //
|
||||
// Project: WANProxy XTech //
|
||||
// Author: Andreu Vidal Bramfeld-Software //
|
||||
// Last modified: 2015-04-01 //
|
||||
// //
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <common/filter.h>
|
||||
#include <event/action.h>
|
||||
#include <event/event.h>
|
||||
#include <io/socket/socket.h>
|
||||
|
||||
class SinkFilter : public BufferedFilter
|
||||
{
|
||||
private:
|
||||
Socket* sink_;
|
||||
Action* write_action_;
|
||||
bool client_, down_, closing_;
|
||||
|
||||
public:
|
||||
SinkFilter (const LogHandle& log, Socket* sck, bool cln = 0);
|
||||
virtual ~SinkFilter ();
|
||||
|
||||
virtual bool consume (Buffer& buf);
|
||||
void write_complete (Event e);
|
||||
virtual void flush (int flg);
|
||||
};
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue