# class SocketFilter | A filter for received socket data. More...
Contains pure virtuals
Full name | `TelEngine::SocketFilter`
Definition | `#include <yateclass.h>`
Inherits | TelEngine::GenObject [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- 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)
- inline Socket* socket () const
- bool valid () const

## Detailed Description

Abstract interface for an object that filters socket received data packets

SocketFilter () | ### SocketFilter

Constructor

~SocketFilter () | ### ~SocketFilter

[virtual]

Destructor, unregisters from socket

void* getObject (const String& name) | ### getObject

[const virtual]

Get a pointer to a derived class given that class name

Parameters:

name | Name of the class we are asking for

Returns: Pointer to the requested class or NULL if this object doesn't implement it

Reimplemented from GenObject.

void timerTick (const Time& when) | ### timerTick

[virtual]

Run whatever actions required on idle thread runs

Parameters:

when | Time when the idle run started

bool received (void* buffer, int length, int flags, const struct sockaddr* addr, socklen_t adrlen) | ### received

[pure virtual]

Notify this filter about a received block of data

Parameters:

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

Returns: True if this filter claimed the data

inline Socket* socket () | ### socket

[const]

Get the socket to which the filter is currently attached

Returns: Pointer to the socket of this filter

bool valid () | ### valid

[const]

Check if the socket of this filter is valid

Returns: True if the filter has a valid socket

Generated by: paulc on bussard on Fri Dec 21 16:28:34 2012, using kdoc 2.0a54.