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

CNullStreamSocketConnectionFilter Class Reference
[FilteringNull Objects]

Inheritance diagram for CNullStreamSocketConnectionFilter:
Collaboration diagram for CNullStreamSocketConnectionFilter:

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 (IManageStreamSocketConnectionFilters &) 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 (IFilterableStreamSocket &, const IFullAddress &, const void *, const void *) override
 Called before an outbound connection is attempted but after the socket is allocated. This call can be used to reroute connections or to "plug" connect data into the socket's user data.
void FilterConnectionEstablished (IFilterableStreamSocket &, 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 (IFilterableStreamSocket &, 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 (IFilterableStreamSocket &, 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 IManageStreamSocketConnectionFilters rather than calling this function with its own buffer.
void FilterReadCompleted (IFilterableStreamSocket &, 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 IManageStreamSocketConnectionFilters interface.
void FilterReadCompletionError (IFilterableStreamSocket &, 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 (IFilterableStreamSocket &, 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 IManageStreamSocketConnectionFilters 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 FilterWriteRequest (IFilterableStreamSocket &, JetByteTools::IO::IIterateableBufferChain &) override
 Called when a buffer chain 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 buffers with completely new buffers or by replacing the contents of the supplied buffers, and cancelling the call by clearing the buffer chain which will cause the filter chain traversal to stop. If a filter wishes to generate its own writes then it should use IManageStreamSocketConnectionFilters rather than calling this function with its own buffers. Note that should a filter clear the buffer chain then it is taking responsibility for calling WriteCompleted() on the socket when the writes actually complete. 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 (IFilterableStreamSocket &, 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 IManageStreamSocketConnectionFilters interface.
void FilterWriteCompletionError (IFilterableStreamSocket &, 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 FilterClientClose (IFilterableStreamSocket &) override
 Called when the receive side of a connection is closed by the peer.
void FilterConnectionReset (IFilterableStreamSocket &, const DWORD) override
 Called when the a connection is reset.
void FilterConnectionClosure (IFilterableStreamSocket &, const ConnectionClosureReason) override
 Called when the connection is closed.
void FilterConnectionClosed (IFilterableStreamSocket &) override
void FilterShutdown (IFilterableStreamSocket &, const ShutdownHow) override
 Called when the socket has been shutdown, note that the filter cannot currently intercept and change/delay the shutdown call.
void FilterConnectionAborted (IFilterableStreamSocket &, const ConnectionClosureReason, const bool) override
 Called for each socket when a connection manager aborts all of its active connections.
void FilterSocketReleased (JetByteTools::Core::IIndexedOpaqueUserData &) override
 Called after IStreamSocketConnectionManagerCallback::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 ( IManageStreamSocketConnectionFilters 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 IFilterStreamSocketConnections.

Reimplemented in CStreamSocketConnectionFilterBase.

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 IFilterStreamSocketConnections.

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

Called before an outbound connection is attempted but after the socket is allocated. This call can be used to reroute connections or to "plug" connect data into the socket's user data.

Implements IFilterStreamSocketConnections.

void FilterConnectionEstablished ( IFilterableStreamSocket 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 IFilterStreamSocketConnections.

void FilterConnectionFailed ( IFilterableStreamSocket 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 IFilterStreamSocketConnections.

Reimplemented in CStreamSocketConnectionFilterBase.

bool FilterReadRequest ( IFilterableStreamSocket 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 IManageStreamSocketConnectionFilters rather than calling this function with its own buffer.

Implements IFilterStreamSocketConnections.

Reimplemented in CStreamSocketConnectionFilterBase.

void FilterReadCompleted ( IFilterableStreamSocket 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 IManageStreamSocketConnectionFilters interface.

Implements IFilterStreamSocketConnections.

Reimplemented in CStreamSocketConnectionFilterBase.

void FilterReadCompletionError ( IFilterableStreamSocket 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 IFilterStreamSocketConnections.

void FilterWriteRequest ( IFilterableStreamSocket 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 IManageStreamSocketConnectionFilters 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 IFilterStreamSocketConnections.

Reimplemented in CStreamSocketConnectionFilterBase.

void FilterWriteRequest ( IFilterableStreamSocket socket,
JetByteTools::IO::IIterateableBufferChain buffers 
) [inline, override, virtual]

Called when a buffer chain 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 buffers with completely new buffers or by replacing the contents of the supplied buffers, and cancelling the call by clearing the buffer chain which will cause the filter chain traversal to stop. If a filter wishes to generate its own writes then it should use IManageStreamSocketConnectionFilters rather than calling this function with its own buffers. Note that should a filter clear the buffer chain then it is taking responsibility for calling WriteCompleted() on the socket when the writes actually complete. 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 IFilterStreamSocketConnections.

Reimplemented in CStreamSocketConnectionFilterBase.

void FilterWriteCompleted ( IFilterableStreamSocket 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 IManageStreamSocketConnectionFilters interface.

Implements IFilterStreamSocketConnections.

Reimplemented in CStreamSocketConnectionFilterBase.

void FilterWriteCompletionError ( IFilterableStreamSocket 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 IFilterStreamSocketConnections.

Reimplemented in CStreamSocketConnectionFilterBase.

void FilterClientClose ( IFilterableStreamSocket socket  )  [inline, override, virtual]

Called when the receive side of a connection is closed by the peer.

Implements IFilterStreamSocketConnections.

Reimplemented in CStreamSocketConnectionFilterBase.

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

Called when the a connection is reset.

Implements IFilterStreamSocketConnections.

Reimplemented in CStreamSocketConnectionFilterBase.

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

Called when the connection is closed.

Implements IFilterStreamSocketConnections.

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

void FilterShutdown ( IFilterableStreamSocket socket,
const   how 
) [inline, override, virtual]

Called when the socket has been shutdown, note that the filter cannot currently intercept and change/delay the shutdown call.

Implements IFilterStreamSocketConnections.

Reimplemented in CStreamSocketConnectionFilterBase.

void FilterConnectionAborted ( IFilterableStreamSocket socket,
const   reason,
const   wasUserSocket 
) [inline, override, virtual]

Called for each socket when a connection manager aborts all of its active connections.

Implements IFilterStreamSocketConnections.

Reimplemented in CStreamSocketConnectionFilterBase.

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

Called after IStreamSocketConnectionManagerCallback::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 IFilterStreamSocketConnections.

Reimplemented in CStreamSocketConnectionFilterBase.


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