Public Types | |
typedef std::list < IFilterDatagramSocketConnections * > | Filters |
Public Member Functions | |
TDatagramFilteringHelper (Callback &callback, IOManager &manager, JetByteTools::Core::IProvideUserData &dataProvider) | |
void | AddConnectionFilter (IFilterDatagramSocketConnections &filter, bool canGenerateOurOwnWrites) override |
Adds a connection filter to the connection manager. Connection filters are called in order to process calls with requests being called from "top to bottom" and completions being called from "bottom to top". For example, if filter A is added and then filter B is added and then we make a write request the data would be processed first by filter B and then by filter A (user -> B -> A -> wire). When a read completes. | |
JetByteTools::Core::IIndexedOpaqueUserData::UserDataIndex | RequestUserDataSlot (const JetByteTools::Core::_tstring &name) override |
Request a named user data slot and get an index to use in calls to methods on IIndexedOpaqueUserData. | |
JetByteTools::Core::IIndexedOpaqueUserData::UserDataIndex | LockUserDataSlots () override |
Prevent more user data slots from being allocated. Returns the number of user data slots that have been allocated. | |
void | OnSocketAttached (JetByteTools::Core::IIndexedOpaqueUserData &userData) |
void | OnPreOutgoingConnect (Socket &socket, const IFullAddress &address, const void *pUserData, const void *pFilterData) |
void | OnConnectionEstablished (Socket &socket, const IAddress &address) |
void | OnOutgoingConnectionFailed (Socket &socket, const IAddress &address, DWORD lastError) |
bool | OnRequestRead (Socket &socket, JetByteTools::IO::CSmartBuffer &buffer) |
void | OnReadCompleted (Socket &socket, JetByteTools::IO::CSmartBuffer &buffer) |
void | OnReadCompletionError (Socket &socket, JetByteTools::IO::CSmartBuffer &buffer, DWORD lastError) |
void | OnRequestWrite (Socket &socket, JetByteTools::IO::CSmartBuffer &buffer) |
void | OnWriteCompleted (Socket &socket, JetByteTools::IO::CSmartBuffer &buffer) |
void | OnWriteCompletionError (Socket &socket, JetByteTools::IO::CSmartBuffer &buffer, DWORD lastError) |
void | OnRequestSendTo (Socket &socket, const IAddress &address, JetByteTools::IO::CSmartBuffer &buffer) |
void | OnSendToCompleted (Socket &socket, const IAddress &address, JetByteTools::IO::CSmartBuffer &buffer) |
void | OnSendToCompletionError (Socket &socket, const IAddress &address, JetByteTools::IO::CSmartBuffer &buffer, DWORD lastError) |
void | OnConnectionReset (Socket &socket, DWORD lastError) |
void | OnConnectionClosed (Socket &socket, ConnectionClosureReason reason) |
void | OnSocketReleased (JetByteTools::Core::IIndexedOpaqueUserData &userData) |
bool | FilterReadRequest (Socket &socket, JetByteTools::IO::CSmartBuffer &buffer, const IFilterDatagramSocketConnections *pStartAfter) |
void | FilterReadCompleted (Socket &socket, JetByteTools::IO::CSmartBuffer &buffer, const IFilterDatagramSocketConnections *pStartAfter) |
void | FilterWriteRequest (Socket &socket, JetByteTools::IO::CSmartBuffer &buffer, const IFilterDatagramSocketConnections *pStartAfter) |
void | FilterWriteCompleted (Socket &socket, JetByteTools::IO::CSmartBuffer &buffer, const IFilterDatagramSocketConnections *pStartAfter) |
void | FilterWriteCompletionError (Socket &socket, JetByteTools::IO::CSmartBuffer &buffer, DWORD lastError, const IFilterDatagramSocketConnections *pStartAfter) |
void | FilterSendToRequest (Socket &socket, const IAddress &address, JetByteTools::IO::CSmartBuffer &buffer, const IFilterDatagramSocketConnections *pStartAfter) |
void | FilterSendToCompleted (Socket &socket, const IAddress &address, JetByteTools::IO::CSmartBuffer &buffer, const IFilterDatagramSocketConnections *pStartAfter) |
void | FilterSendToCompletionError (Socket &socket, const IAddress &address, JetByteTools::IO::CSmartBuffer &buffer, DWORD lastError, const IFilterDatagramSocketConnections *pStartAfter) |
void | RequestRead (IFilterableDatagramSocket &socket, JetByteTools::IO::CSmartBuffer &buffer, IFilterDatagramSocketConnections &requestingFilter) override |
Generate a read request and pass it to the next filter in the chain. | |
void | ReadCompleted (IFilterableDatagramSocket &socket, JetByteTools::IO::CSmartBuffer &buffer, IFilterDatagramSocketConnections &requestingFilter) override |
Generate a read completion and pass it to the next filter in the chain. | |
void | RequestRecvFrom (IFilterableDatagramSocket &socket, JetByteTools::IO::CSmartBuffer &buffer, IFilterDatagramSocketConnections &requestingFilter) override |
Generate a RecvFrom request and pass it to the next filter in the chain. | |
void | RecvFromCompleted (IFilterableDatagramSocket &socket, const IAddress &address, JetByteTools::IO::CSmartBuffer &buffer, IFilterDatagramSocketConnections &requestingFilter) override |
Generate a RecvFrom completion and pass it to the next filter in the chain. | |
void | RequestWrite (IFilterableDatagramSocket &socket, JetByteTools::IO::CSmartBuffer &buffer, IFilterDatagramSocketConnections &requestingFilter) override |
Generate a write request and pass it to the next filter in the chain. | |
void | WriteCompleted (IFilterableDatagramSocket &socket, JetByteTools::IO::CSmartBuffer &buffer, IFilterDatagramSocketConnections &requestingFilter) override |
Generate a Write completion and pass it to the next filter in the chain. | |
void | WriteCompletionError (IFilterableDatagramSocket &socket, JetByteTools::IO::CSmartBuffer &buffer, DWORD lastError, IFilterDatagramSocketConnections &requestingFilter) override |
Generate a Write completion error and pass it to the next filter in the chain. | |
void | RequestSendTo (IFilterableDatagramSocket &socket, const IAddress &address, JetByteTools::IO::CSmartBuffer &buffer, IFilterDatagramSocketConnections &requestingFilter) override |
Generate a SendTo request and pass it to the next filter in the chain. | |
void | SendToCompleted (IFilterableDatagramSocket &socket, const IAddress &address, JetByteTools::IO::CSmartBuffer &buffer, IFilterDatagramSocketConnections &requestingFilter) override |
Generate a SendTo completion and pass it to the next filter in the chain. | |
void | SendToCompletionError (IFilterableDatagramSocket &socket, const IAddress &address, JetByteTools::IO::CSmartBuffer &buffer, DWORD lastError, IFilterDatagramSocketConnections &requestingFilter) override |
Generate a SendTo completion error and pass it to the next filter in the chain. | |
TDatagramFilteringHelper (const TDatagramFilteringHelper &rhs) | |
TDatagramFilteringHelper & | operator= (const TDatagramFilteringHelper &rhs) |
Public Attributes | |
Filters | m_filters |
Callback & | m_callback |
IOManager & | m_manager |
JetByteTools::Core::IProvideUserData & | m_dataProvider |
bool | m_hasFilterThatCanGenerateOwnWrites |
typedef std::list<IFilterDatagramSocketConnections *> Filters |
TDatagramFilteringHelper | ( | Callback & | callback, | |
IOManager & | manager, | |||
JetByteTools::Core::IProvideUserData & | dataProvider | |||
) | [inline] |
TDatagramFilteringHelper | ( | const TDatagramFilteringHelper< Callback, IOManager, Socket > & | rhs | ) |
void AddConnectionFilter | ( | IFilterDatagramSocketConnections & | filter, | |
bool | canGenerateOurOwnWrites | |||
) | [inline, override, virtual] |
Adds a connection filter to the connection manager. Connection filters are called in order to process calls with requests being called from "top to bottom" and completions being called from "bottom to top". For example, if filter A is added and then filter B is added and then we make a write request the data would be processed first by filter B and then by filter A (user -> B -> A -> wire). When a read completes.
(wire -> A -> B -> user).
Implements IAcceptDatagramSocketConnectionFilters.
JetByteTools::Core::IIndexedOpaqueUserData::UserDataIndex RequestUserDataSlot | ( | const JetByteTools::Core::_tstring & | name | ) | [inline, override, virtual] |
Request a named user data slot and get an index to use in calls to methods on IIndexedOpaqueUserData.
Implements IProvideUserData.
JetByteTools::Core::IIndexedOpaqueUserData::UserDataIndex LockUserDataSlots | ( | ) | [inline, override, virtual] |
Prevent more user data slots from being allocated. Returns the number of user data slots that have been allocated.
Implements IProvideUserData.
void OnSocketAttached | ( | JetByteTools::Core::IIndexedOpaqueUserData & | userData | ) | [inline] |
void OnPreOutgoingConnect | ( | Socket & | socket, | |
const IFullAddress & | address, | |||
const void * | pUserData, | |||
const void * | pFilterData | |||
) | [inline] |
void OnConnectionEstablished | ( | Socket & | socket, | |
const IAddress & | address | |||
) | [inline] |
void OnOutgoingConnectionFailed | ( | Socket & | socket, | |
const IAddress & | address, | |||
DWORD | lastError | |||
) | [inline] |
bool OnRequestRead | ( | Socket & | socket, | |
JetByteTools::IO::CSmartBuffer & | buffer | |||
) | [inline] |
void OnReadCompleted | ( | Socket & | socket, | |
JetByteTools::IO::CSmartBuffer & | buffer | |||
) | [inline] |
void OnReadCompletionError | ( | Socket & | socket, | |
JetByteTools::IO::CSmartBuffer & | buffer, | |||
DWORD | lastError | |||
) | [inline] |
void OnRequestWrite | ( | Socket & | socket, | |
JetByteTools::IO::CSmartBuffer & | buffer | |||
) | [inline] |
void OnWriteCompleted | ( | Socket & | socket, | |
JetByteTools::IO::CSmartBuffer & | buffer | |||
) | [inline] |
void OnWriteCompletionError | ( | Socket & | socket, | |
JetByteTools::IO::CSmartBuffer & | buffer, | |||
DWORD | lastError | |||
) | [inline] |
void OnRequestSendTo | ( | Socket & | socket, | |
const IAddress & | address, | |||
JetByteTools::IO::CSmartBuffer & | buffer | |||
) | [inline] |
void OnSendToCompleted | ( | Socket & | socket, | |
const IAddress & | address, | |||
JetByteTools::IO::CSmartBuffer & | buffer | |||
) | [inline] |
void OnSendToCompletionError | ( | Socket & | socket, | |
const IAddress & | address, | |||
JetByteTools::IO::CSmartBuffer & | buffer, | |||
DWORD | lastError | |||
) | [inline] |
void OnConnectionReset | ( | Socket & | socket, | |
DWORD | lastError | |||
) | [inline] |
void OnConnectionClosed | ( | Socket & | socket, | |
ConnectionClosureReason | reason | |||
) | [inline] |
void OnSocketReleased | ( | JetByteTools::Core::IIndexedOpaqueUserData & | userData | ) | [inline] |
bool FilterReadRequest | ( | Socket & | socket, | |
JetByteTools::IO::CSmartBuffer & | buffer, | |||
const IFilterDatagramSocketConnections * | pStartAfter | |||
) | [inline] |
void FilterReadCompleted | ( | Socket & | socket, | |
JetByteTools::IO::CSmartBuffer & | buffer, | |||
const IFilterDatagramSocketConnections * | pStartAfter | |||
) | [inline] |
void FilterWriteRequest | ( | Socket & | socket, | |
JetByteTools::IO::CSmartBuffer & | buffer, | |||
const IFilterDatagramSocketConnections * | pStartAfter | |||
) | [inline] |
void FilterWriteCompleted | ( | Socket & | socket, | |
JetByteTools::IO::CSmartBuffer & | buffer, | |||
const IFilterDatagramSocketConnections * | pStartAfter | |||
) | [inline] |
void FilterWriteCompletionError | ( | Socket & | socket, | |
JetByteTools::IO::CSmartBuffer & | buffer, | |||
DWORD | lastError, | |||
const IFilterDatagramSocketConnections * | pStartAfter | |||
) | [inline] |
void FilterSendToRequest | ( | Socket & | socket, | |
const IAddress & | address, | |||
JetByteTools::IO::CSmartBuffer & | buffer, | |||
const IFilterDatagramSocketConnections * | pStartAfter | |||
) | [inline] |
void FilterSendToCompleted | ( | Socket & | socket, | |
const IAddress & | address, | |||
JetByteTools::IO::CSmartBuffer & | buffer, | |||
const IFilterDatagramSocketConnections * | pStartAfter | |||
) | [inline] |
void FilterSendToCompletionError | ( | Socket & | socket, | |
const IAddress & | address, | |||
JetByteTools::IO::CSmartBuffer & | buffer, | |||
DWORD | lastError, | |||
const IFilterDatagramSocketConnections * | pStartAfter | |||
) | [inline] |
void RequestRead | ( | IFilterableDatagramSocket & | socket, | |
JetByteTools::IO::CSmartBuffer & | buffer, | |||
IFilterDatagramSocketConnections & | requestingFilter | |||
) | [inline, override, virtual] |
Generate a read request and pass it to the next filter in the chain.
Implements IManageDatagramSocketConnectionFilters.
void ReadCompleted | ( | IFilterableDatagramSocket & | socket, | |
JetByteTools::IO::CSmartBuffer & | buffer, | |||
IFilterDatagramSocketConnections & | requestingFilter | |||
) | [inline, override, virtual] |
Generate a read completion and pass it to the next filter in the chain.
Implements IManageDatagramSocketConnectionFilters.
void RequestRecvFrom | ( | IFilterableDatagramSocket & | socket, | |
JetByteTools::IO::CSmartBuffer & | buffer, | |||
IFilterDatagramSocketConnections & | requestingFilter | |||
) | [inline, override, virtual] |
Generate a RecvFrom request and pass it to the next filter in the chain.
Implements IManageDatagramSocketConnectionFilters.
void RecvFromCompleted | ( | IFilterableDatagramSocket & | socket, | |
const IAddress & | address, | |||
JetByteTools::IO::CSmartBuffer & | buffer, | |||
IFilterDatagramSocketConnections & | requestingFilter | |||
) | [inline, override, virtual] |
Generate a RecvFrom completion and pass it to the next filter in the chain.
Implements IManageDatagramSocketConnectionFilters.
void RequestWrite | ( | IFilterableDatagramSocket & | socket, | |
JetByteTools::IO::CSmartBuffer & | buffer, | |||
IFilterDatagramSocketConnections & | requestingFilter | |||
) | [inline, override, virtual] |
Generate a write request and pass it to the next filter in the chain.
Implements IManageDatagramSocketConnectionFilters.
void WriteCompleted | ( | IFilterableDatagramSocket & | socket, | |
JetByteTools::IO::CSmartBuffer & | buffer, | |||
IFilterDatagramSocketConnections & | requestingFilter | |||
) | [inline, override, virtual] |
Generate a Write completion and pass it to the next filter in the chain.
Implements IManageDatagramSocketConnectionFilters.
void WriteCompletionError | ( | IFilterableDatagramSocket & | socket, | |
JetByteTools::IO::CSmartBuffer & | buffer, | |||
DWORD | lastError, | |||
IFilterDatagramSocketConnections & | requestingFilter | |||
) | [inline, override, virtual] |
Generate a Write completion error and pass it to the next filter in the chain.
Implements IManageDatagramSocketConnectionFilters.
void RequestSendTo | ( | IFilterableDatagramSocket & | socket, | |
const IAddress & | address, | |||
JetByteTools::IO::CSmartBuffer & | buffer, | |||
IFilterDatagramSocketConnections & | requestingFilter | |||
) | [inline, override, virtual] |
Generate a SendTo request and pass it to the next filter in the chain.
Implements IManageDatagramSocketConnectionFilters.
void SendToCompleted | ( | IFilterableDatagramSocket & | socket, | |
const IAddress & | address, | |||
JetByteTools::IO::CSmartBuffer & | buffer, | |||
IFilterDatagramSocketConnections & | requestingFilter | |||
) | [inline, override, virtual] |
Generate a SendTo completion and pass it to the next filter in the chain.
Implements IManageDatagramSocketConnectionFilters.
void SendToCompletionError | ( | IFilterableDatagramSocket & | socket, | |
const IAddress & | address, | |||
JetByteTools::IO::CSmartBuffer & | buffer, | |||
DWORD | lastError, | |||
IFilterDatagramSocketConnections & | requestingFilter | |||
) | [inline, override, virtual] |
Generate a SendTo completion error and pass it to the next filter in the chain.
Implements IManageDatagramSocketConnectionFilters.
TDatagramFilteringHelper& operator= | ( | const TDatagramFilteringHelper< Callback, IOManager, Socket > & | rhs | ) |
Callback& m_callback |
IOManager& m_manager |