The C++ framework for developing highly scalable, high performance servers on Windows platforms.

CNullDatagramSocketConnectionFilter Class Reference
[FilteringNull Objects]

Inheritance diagram for CNullDatagramSocketConnectionFilter:
Collaboration diagram for CNullDatagramSocketConnectionFilter:

List of all members.


Detailed Description

A connection filter that does nothing. You can use this as a base class for your own filter if you don't need to override all of the filter functionality.

Public Member Functions

void InitialiseFilter (IManageDatagramSocketConnectionFilters &) override
 Called once before any other method on this interface is called. The manager interface should be used to generate new read and write events.
void FilterSocketAttached (JetByteTools::Core::IIndexedOpaqueUserData &) override
 Called when a socket is first prepared for use. Can be used to allow the filter to plug its own user data into the socket's user data store. Note that unlike most other filter functions this call is always executed on the whole of the filter chain.
void FilterConnect (IFilterableDatagramSocket &, const IFullAddress &, const void *, const void *) override
 Called when a datagram connection manager issues a call to 'Connect' on a datagram socket. Note that this only means that the socket is logically connected and allows for Read and Write operations to occur with an implicit peer address of the address supplied to the call to Connect.
void FilterConnectionEstablished (IFilterableDatagramSocket &, const IAddress &) override
 Called when a connection (inbound or outbound) is established. You can determine which direction the connection is (if that's important) by calling GetConnectionDirection() on the socket. Note that a filter may receive a read or write request before a connection establishment notification if a filter lower in the chain issues a read or write during its connection establishment notification.
void FilterConnectionFailed (IFilterableDatagramSocket &, const IAddress &, const DWORD) override
 Called when an outbound connection fails to be established. The filter cannot block these notifications, but it can use it to track the success of connects that it is filtering.
bool FilterReadRequest (IFilterableDatagramSocket &, JetByteTools::IO::CSmartBuffer &) override
 Called when a read is requested. The supplied buffer is optional and may be null. The filter can remove the supplied buffer or add one of its own. If no buffer is available and the read is allowed to occur then a buffer will be allocated just before the read is issued. Filters can prevent the application (and filters above) from issuing reads by returning false which will cause the filter chain traversal to stop and the request to be cancelled. If a filter wishes to generate its own reads then it should use IManageDatagramSocketConnectionFilters rather than calling this function with its own buffer.
void FilterReadCompleted (IFilterableDatagramSocket &, JetByteTools::IO::CSmartBuffer &) override
 Called when a read has completed. The filter can manipulate the data in any way that it likes. This includes using the data for its own purposes, replacing the data with its own, either by replacing the buffer with a completely new buffer or by replacing the contents of the supplied buffer, and cancelling the call by clearing the CSmartBuffer (by calling Release()) which will cause the filter chain traversal to stop. Filters can also generate any number of their own read completions via the IManageDatagramSocketConnectionFilters interface.
void FilterReadCompletionError (IFilterableDatagramSocket &, JetByteTools::IO::CSmartBuffer &, const DWORD) override
 Called when a read has completed with an error. The filter can manipulate the data in any way that it likes. This includes using the data for its own purposes, replacing the data with its own, either by replacing the buffer with a completely new buffer or by replacing the contents of the supplied buffer, and cancelling the call by clearing the CSmartBuffer (by calling Release()) which will cause the filter chain traversal to stop.
bool FilterRecvFromRequest (IFilterableDatagramSocket &, JetByteTools::IO::CSmartBuffer &) override
 Called when a RecvFrom is requested. The supplied buffer is optional and may be null. The filter can remove the supplied buffer or add one of its own. If no buffer is available and the read is allowed to occur then a buffer will be allocated just before the read is issued. Filters can prevent the application (and filters above) from issuing reads by returning false which will cause the filter chain traversal to stop and the request to be cancelled. If a filter wishes to generate its own reads then it should use IManageDatagramSocketConnectionFilters rather than calling this function with its own buffer.
void FilterRecvFromCompleted (IFilterableDatagramSocket &, const IAddress &, JetByteTools::IO::CSmartBuffer &) override
 Called when a RecvFrom has completed. The filter can manipulate the data in any way that it likes. This includes using the data for its own purposes, replacing the data with its own, either by replacing the buffer with a completely new buffer or by replacing the contents of the supplied buffer, and cancelling the call by clearing the CSmartBuffer (by calling Release()) which will cause the filter chain traversal to stop. Filters can also generate any number of their own read completions via the IManageDatagramSocketConnectionFilters interface.
void FilterRecvFromCompletionError (IFilterableDatagramSocket &, const IAddress &, JetByteTools::IO::CSmartBuffer &, const DWORD) override
 Called when a read has completed with an error. The filter can manipulate the data in any way that it likes. This includes using the data for its own purposes, replacing the data with its own, either by replacing the buffer with a completely new buffer or by replacing the contents of the supplied buffer, and cancelling the call by clearing the CSmartBuffer (by calling Release()) which will cause the filter chain traversal to stop.
void FilterWriteRequest (IFilterableDatagramSocket &, JetByteTools::IO::CSmartBuffer &) override
 Called when a write is requested. The filter can manipulate the data in any way that it likes. This includes using the data for its own purposes, replacing the data with its own, either by replacing the buffer with a completely new buffer or by replacing the contents of the supplied buffer, and cancelling the call by clearing the CSmartBuffer (by calling Release()) which will cause the filter chain traversal to stop. If a filter wishes to generate its own writes then it should use IManageDatagramSocketConnectionFilters rather than calling this function with its own buffer. Note that should a filter clear the CSmartBuffer then it is taking responsibility for calling WriteCompleted() on the socket when the write actually completes. This may be straight away, if the filter is simply preventing writes being issued or it may be when the buffer is eventually written if it's queuing writes internally.
void FilterWriteCompleted (IFilterableDatagramSocket &, JetByteTools::IO::CSmartBuffer &) override
 Called when a write has completed. The filter can manipulate the data in any way that it likes. This includes using the data for its own purposes, replacing the data with its own, either by replacing the buffer with a completely new buffer or by replacing the contents of the supplied buffer, and cancelling the call by clearing the CSmartBuffer (by calling Release()) which will cause the filter chain traversal to stop. Filters can also generate any number of their own write completions via the IManageDatagramSocketConnectionFilters interface.
void FilterWriteCompletionError (IFilterableDatagramSocket &, JetByteTools::IO::CSmartBuffer &, const DWORD) override
 Called when a write has completed with an error. The filter can manipulate the data in any way that it likes. This includes using the data for its own purposes, replacing the data with its own, either by replacing the buffer with a completely new buffer or by replacing the contents of the supplied buffer, and cancelling the call by clearing the CSmartBuffer (by calling Release()) which will cause the filter chain traversal to stop.
void FilterSendToRequest (IFilterableDatagramSocket &, const IAddress &, JetByteTools::IO::CSmartBuffer &) override
 Called when a SendTo is requested. The filter can manipulate the data in any way that it likes. This includes using the data for its own purposes, replacing the data with its own, either by replacing the buffer with a completely new buffer or by replacing the contents of the supplied buffer, and cancelling the call by clearing the CSmartBuffer (by calling Release()) which will cause the filter chain traversal to stop. If a filter wishes to generate its own SendTos then it should use IManageDatagramSocketConnectionFilters rather than calling this function with its own buffer. Note that should a filter clear the CSmartBuffer then it is taking responsibility for calling WriteCompleted() on the socket when the SendTo actually completes. This may be straight away, if the filter is simply preventing SendTos being issued or it may be when the buffer is eventually written if it's queuing writes internally.
void FilterSendToCompleted (IFilterableDatagramSocket &, const IAddress &, JetByteTools::IO::CSmartBuffer &) override
 Called when a SendTo has completed. The filter can manipulate the data in any way that it likes. This includes using the data for its own purposes, replacing the data with its own, either by replacing the buffer with a completely new buffer or by replacing the contents of the supplied buffer, and cancelling the call by clearing the CSmartBuffer (by calling Release()) which will cause the filter chain traversal to stop. Filters can also generate any number of their own write completions via the IManageDatagramSocketConnectionFilters interface.
void FilterSendToCompletionError (IFilterableDatagramSocket &, const IAddress &, JetByteTools::IO::CSmartBuffer &, const DWORD) override
 Called when a SendTo has completed with an error. The filter can manipulate the data in any way that it likes. This includes using the data for its own purposes, replacing the data with its own, either by replacing the buffer with a completely new buffer or by replacing the contents of the supplied buffer, and cancelling the call by clearing the CSmartBuffer (by calling Release()) which will cause the filter chain traversal to stop.
void FilterConnectionReset (IFilterableDatagramSocket &, const DWORD) override
 Called when the a connection is reset.
void FilterConnectionClosure (IFilterableDatagramSocket &, const ConnectionClosureReason) override
 Called when the connection is closed.
void FilterConnectionClosed (IFilterableDatagramSocket &) override
void FilterSocketReleased (JetByteTools::Core::IIndexedOpaqueUserData &) override
 Called after IDatagramSocketConnectionManagerCallback::OnSocketReleased() callback and before the socket is passed to the allocator. This can be used to remove any user data that was added by the filter in a FilterConnect() call or a FilterSocketAttached() call. Note that unlike most other filter functions this call is always executed on the whole of the filter chain.

Member Function Documentation

void InitialiseFilter ( IManageDatagramSocketConnectionFilters manager  )  [inline, override, virtual]

Called once before any other method on this interface is called. The manager interface should be used to generate new read and write events.

Implements IFilterDatagramSocketConnections.

void FilterSocketAttached ( JetByteTools::Core::IIndexedOpaqueUserData userData  )  [inline, override, virtual]

Called when a socket is first prepared for use. Can be used to allow the filter to plug its own user data into the socket's user data store. Note that unlike most other filter functions this call is always executed on the whole of the filter chain.

Implements IFilterDatagramSocketConnections.

void FilterConnect ( IFilterableDatagramSocket socket,
const IFullAddress address,
const void *  pUserData,
const void *  pFilterData 
) [inline, override, virtual]

Called when a datagram connection manager issues a call to 'Connect' on a datagram socket. Note that this only means that the socket is logically connected and allows for Read and Write operations to occur with an implicit peer address of the address supplied to the call to Connect.

Implements IFilterDatagramSocketConnections.

void FilterConnectionEstablished ( IFilterableDatagramSocket socket,
const IAddress address 
) [inline, override, virtual]

Called when a connection (inbound or outbound) is established. You can determine which direction the connection is (if that's important) by calling GetConnectionDirection() on the socket. Note that a filter may receive a read or write request before a connection establishment notification if a filter lower in the chain issues a read or write during its connection establishment notification.

Implements IFilterDatagramSocketConnections.

void FilterConnectionFailed ( IFilterableDatagramSocket socket,
const IAddress address,
const   lastError 
) [inline, override, virtual]

Called when an outbound connection fails to be established. The filter cannot block these notifications, but it can use it to track the success of connects that it is filtering.

Implements IFilterDatagramSocketConnections.

bool FilterReadRequest ( IFilterableDatagramSocket socket,
JetByteTools::IO::CSmartBuffer buffer 
) [inline, override, virtual]

Called when a read is requested. The supplied buffer is optional and may be null. The filter can remove the supplied buffer or add one of its own. If no buffer is available and the read is allowed to occur then a buffer will be allocated just before the read is issued. Filters can prevent the application (and filters above) from issuing reads by returning false which will cause the filter chain traversal to stop and the request to be cancelled. If a filter wishes to generate its own reads then it should use IManageDatagramSocketConnectionFilters rather than calling this function with its own buffer.

Implements IFilterDatagramSocketConnections.

void FilterReadCompleted ( IFilterableDatagramSocket socket,
JetByteTools::IO::CSmartBuffer buffer 
) [inline, override, virtual]

Called when a read has completed. The filter can manipulate the data in any way that it likes. This includes using the data for its own purposes, replacing the data with its own, either by replacing the buffer with a completely new buffer or by replacing the contents of the supplied buffer, and cancelling the call by clearing the CSmartBuffer (by calling Release()) which will cause the filter chain traversal to stop. Filters can also generate any number of their own read completions via the IManageDatagramSocketConnectionFilters interface.

Implements IFilterDatagramSocketConnections.

void FilterReadCompletionError ( IFilterableDatagramSocket socket,
JetByteTools::IO::CSmartBuffer buffer,
const   lastError 
) [inline, override, virtual]

Called when a read has completed with an error. The filter can manipulate the data in any way that it likes. This includes using the data for its own purposes, replacing the data with its own, either by replacing the buffer with a completely new buffer or by replacing the contents of the supplied buffer, and cancelling the call by clearing the CSmartBuffer (by calling Release()) which will cause the filter chain traversal to stop.

Implements IFilterDatagramSocketConnections.

bool FilterRecvFromRequest ( IFilterableDatagramSocket socket,
JetByteTools::IO::CSmartBuffer buffer 
) [inline, override, virtual]

Called when a RecvFrom is requested. The supplied buffer is optional and may be null. The filter can remove the supplied buffer or add one of its own. If no buffer is available and the read is allowed to occur then a buffer will be allocated just before the read is issued. Filters can prevent the application (and filters above) from issuing reads by returning false which will cause the filter chain traversal to stop and the request to be cancelled. If a filter wishes to generate its own reads then it should use IManageDatagramSocketConnectionFilters rather than calling this function with its own buffer.

Implements IFilterDatagramSocketConnections.

void FilterRecvFromCompleted ( IFilterableDatagramSocket socket,
const IAddress address,
JetByteTools::IO::CSmartBuffer buffer 
) [inline, override, virtual]

Called when a RecvFrom has completed. The filter can manipulate the data in any way that it likes. This includes using the data for its own purposes, replacing the data with its own, either by replacing the buffer with a completely new buffer or by replacing the contents of the supplied buffer, and cancelling the call by clearing the CSmartBuffer (by calling Release()) which will cause the filter chain traversal to stop. Filters can also generate any number of their own read completions via the IManageDatagramSocketConnectionFilters interface.

Implements IFilterDatagramSocketConnections.

void FilterRecvFromCompletionError ( IFilterableDatagramSocket socket,
const IAddress address,
JetByteTools::IO::CSmartBuffer buffer,
const   lastError 
) [inline, override, virtual]

Called when a read has completed with an error. The filter can manipulate the data in any way that it likes. This includes using the data for its own purposes, replacing the data with its own, either by replacing the buffer with a completely new buffer or by replacing the contents of the supplied buffer, and cancelling the call by clearing the CSmartBuffer (by calling Release()) which will cause the filter chain traversal to stop.

Implements IFilterDatagramSocketConnections.

void FilterWriteRequest ( IFilterableDatagramSocket socket,
JetByteTools::IO::CSmartBuffer buffer 
) [inline, override, virtual]

Called when a write is requested. The filter can manipulate the data in any way that it likes. This includes using the data for its own purposes, replacing the data with its own, either by replacing the buffer with a completely new buffer or by replacing the contents of the supplied buffer, and cancelling the call by clearing the CSmartBuffer (by calling Release()) which will cause the filter chain traversal to stop. If a filter wishes to generate its own writes then it should use IManageDatagramSocketConnectionFilters rather than calling this function with its own buffer. Note that should a filter clear the CSmartBuffer then it is taking responsibility for calling WriteCompleted() on the socket when the write actually completes. This may be straight away, if the filter is simply preventing writes being issued or it may be when the buffer is eventually written if it's queuing writes internally.

Implements IFilterDatagramSocketConnections.

void FilterWriteCompleted ( IFilterableDatagramSocket socket,
JetByteTools::IO::CSmartBuffer buffer 
) [inline, override, virtual]

Called when a write has completed. The filter can manipulate the data in any way that it likes. This includes using the data for its own purposes, replacing the data with its own, either by replacing the buffer with a completely new buffer or by replacing the contents of the supplied buffer, and cancelling the call by clearing the CSmartBuffer (by calling Release()) which will cause the filter chain traversal to stop. Filters can also generate any number of their own write completions via the IManageDatagramSocketConnectionFilters interface.

Implements IFilterDatagramSocketConnections.

void FilterWriteCompletionError ( IFilterableDatagramSocket socket,
JetByteTools::IO::CSmartBuffer buffer,
const   lastError 
) [inline, override, virtual]

Called when a write has completed with an error. The filter can manipulate the data in any way that it likes. This includes using the data for its own purposes, replacing the data with its own, either by replacing the buffer with a completely new buffer or by replacing the contents of the supplied buffer, and cancelling the call by clearing the CSmartBuffer (by calling Release()) which will cause the filter chain traversal to stop.

Implements IFilterDatagramSocketConnections.

void FilterSendToRequest ( IFilterableDatagramSocket socket,
const IAddress address,
JetByteTools::IO::CSmartBuffer buffer 
) [inline, override, virtual]

Called when a SendTo is requested. The filter can manipulate the data in any way that it likes. This includes using the data for its own purposes, replacing the data with its own, either by replacing the buffer with a completely new buffer or by replacing the contents of the supplied buffer, and cancelling the call by clearing the CSmartBuffer (by calling Release()) which will cause the filter chain traversal to stop. If a filter wishes to generate its own SendTos then it should use IManageDatagramSocketConnectionFilters rather than calling this function with its own buffer. Note that should a filter clear the CSmartBuffer then it is taking responsibility for calling WriteCompleted() on the socket when the SendTo actually completes. This may be straight away, if the filter is simply preventing SendTos being issued or it may be when the buffer is eventually written if it's queuing writes internally.

Implements IFilterDatagramSocketConnections.

void FilterSendToCompleted ( IFilterableDatagramSocket socket,
const IAddress address,
JetByteTools::IO::CSmartBuffer buffer 
) [inline, override, virtual]

Called when a SendTo has completed. The filter can manipulate the data in any way that it likes. This includes using the data for its own purposes, replacing the data with its own, either by replacing the buffer with a completely new buffer or by replacing the contents of the supplied buffer, and cancelling the call by clearing the CSmartBuffer (by calling Release()) which will cause the filter chain traversal to stop. Filters can also generate any number of their own write completions via the IManageDatagramSocketConnectionFilters interface.

Implements IFilterDatagramSocketConnections.

void FilterSendToCompletionError ( IFilterableDatagramSocket socket,
const IAddress address,
JetByteTools::IO::CSmartBuffer buffer,
const   lastError 
) [inline, override, virtual]

Called when a SendTo has completed with an error. The filter can manipulate the data in any way that it likes. This includes using the data for its own purposes, replacing the data with its own, either by replacing the buffer with a completely new buffer or by replacing the contents of the supplied buffer, and cancelling the call by clearing the CSmartBuffer (by calling Release()) which will cause the filter chain traversal to stop.

Implements IFilterDatagramSocketConnections.

void FilterConnectionReset ( IFilterableDatagramSocket socket,
const   lastError 
) [inline, override, virtual]

Called when the a connection is reset.

Implements IFilterDatagramSocketConnections.

void FilterConnectionClosure ( IFilterableDatagramSocket socket,
const   reason 
) [inline, override, virtual]

Called when the connection is closed.

Implements IFilterDatagramSocketConnections.

void FilterConnectionClosed ( IFilterableDatagramSocket  )  [inline, override, virtual]

void FilterSocketReleased ( JetByteTools::Core::IIndexedOpaqueUserData userData  )  [inline, override, virtual]

Called after IDatagramSocketConnectionManagerCallback::OnSocketReleased() callback and before the socket is passed to the allocator. This can be used to remove any user data that was added by the filter in a FilterConnect() call or a FilterSocketAttached() call. Note that unlike most other filter functions this call is always executed on the whole of the filter chain.

Implements IFilterDatagramSocketConnections.


Generated on Sun Sep 12 19:10:32 2021 for The Server Framework - v7.4 by doxygen 1.5.3