#include <yateclass.h>
Public Member Functions | |
SocketFilter () | |
virtual | ~SocketFilter () |
virtual void * | getObject (const String &name) const |
virtual void | timerTick (const Time &when) |
virtual bool | received (void *buffer, int length, int flags, const struct sockaddr *addr, socklen_t adrlen)=0 |
Socket * | socket () const |
bool | valid () const |
Friends | |
class | Socket |
Abstract interface for an object that filters socket received data packets
SocketFilter | ( | ) |
Constructor
virtual ~SocketFilter | ( | ) | [virtual] |
Destructor, unregisters from socket
virtual void* getObject | ( | const String & | name | ) | const [virtual] |
Get a pointer to a derived class given that class name
name | Name of the class we are asking for |
Reimplemented from GenObject.
virtual void timerTick | ( | const Time & | when | ) | [virtual] |
Run whatever actions required on idle thread runs
when | Time when the idle run started |
virtual bool received | ( | void * | buffer, | |
int | length, | |||
int | flags, | |||
const struct sockaddr * | addr, | |||
socklen_t | adrlen | |||
) | [pure virtual] |
Notify this filter about a received block of data
buffer | Buffer for received data | |
length | Length of the data in buffer | |
flags | Operating system specific bit flags of the operation | |
addr | Address of the incoming data, may be NULL | |
adrlen | Length of the valid data in address structure |
Socket* socket | ( | ) | const [inline] |
Get the socket to which the filter is currently attached
bool valid | ( | ) | const |
Check if the socket of this filter is valid