IPoolableSocket Class Reference
[SocketsInterfacesOpaque user data]

Inheritance diagram for IPoolableSocket:

Inheritance graph
[legend]
Collaboration diagram for IPoolableSocket:

Collaboration graph
[legend]

List of all members.


Detailed Description

The IPoolableSocket interface provides the 'poolability' of the sockets. Poolable sockets are pooled using a CNodeList and so, for a socket to be pooled it must derive from CNodeList::Node. When a socket is used from the pool or released to the pool the allocator passes the socket's user data to the allocation monitor and so poolable sockets must support IIndexedOpaqueUserData.

Public Types

typedef unsigned short UserDataIndex

Public Member Functions

virtual ~IPoolableSocket ()
 Instances of this interface can be deleted by their users.
virtual void Attach (IPoolableSocketManager &manager, ISocketCallback &callback, SOCKET socket)=0
 Attach the supplied socket manager interface, callback inteface and SOCKET to the pooled socket.
virtual void CloseIfManagedBy (const IPoolableSocketManager &manager)=0
 Close if the manager that is attached to this socket is the same as the one supplied.
virtual void * GetUserPointer (const UserDataIndex index) const =0
 Access the data stored at the specified index as a void pointer.
virtual void SetUserPointer (const UserDataIndex index, void *pData)=0
 Update the data stored at the specified index as a void pointer.
virtual ULONG_PTR GetUserData (const UserDataIndex index) const =0
 Access the data stored at the specified index as an unsigned long.
virtual void SetUserData (const UserDataIndex index, const ULONG_PTR data)=0
 Update the data stored at the specified index as an unsigned long.
Node * Next () const
 Return the next node in the list.
void Next (Node *pNext)
 Set the given node to be this nodes 'next node'.
void RemoveFromList ()
 If this node is currently in a list then it is removed.
bool InList (const CNodeList &list) const
 Returns true if this node is currently in the specified list.
bool InList () const
 Returns true if this node is currently in any list.

Member Typedef Documentation

typedef unsigned short UserDataIndex [inherited]


Constructor & Destructor Documentation

virtual ~IPoolableSocket (  )  [inline, virtual]

Instances of this interface can be deleted by their users.


Member Function Documentation

virtual void Attach ( IPoolableSocketManager manager,
ISocketCallback callback,
SOCKET  socket 
) [pure virtual]

Attach the supplied socket manager interface, callback inteface and SOCKET to the pooled socket.

Implemented in TAsyncSocket< JetByteTools::Socket::IPoolableDatagramSocket, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketCallback >, TAsyncSocket< JetByteTools::Socket::IPoolableStreamSocket, JetByteTools::Socket::IStreamSocketConnectionManager, JetByteTools::Socket::IStreamSocketCallback >, and TAsyncSocket< JetByteTools::Socket::IPoolableDatagramServerSocket, JetByteTools::Socket::IDatagramServerSocketConnectionManager, JetByteTools::Socket::IDatagramServerSocketCallback >.

virtual void CloseIfManagedBy ( const IPoolableSocketManager manager  )  [pure virtual]

Close if the manager that is attached to this socket is the same as the one supplied.

Implemented in TAsyncSocket< JetByteTools::Socket::IPoolableDatagramSocket, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketCallback >, TAsyncSocket< JetByteTools::Socket::IPoolableStreamSocket, JetByteTools::Socket::IStreamSocketConnectionManager, JetByteTools::Socket::IStreamSocketCallback >, and TAsyncSocket< JetByteTools::Socket::IPoolableDatagramServerSocket, JetByteTools::Socket::IDatagramServerSocketConnectionManager, JetByteTools::Socket::IDatagramServerSocketCallback >.

virtual void* GetUserPointer ( const UserDataIndex  index  )  const [pure virtual, inherited]

Access the data stored at the specified index as a void pointer.

Implemented in TAsyncSocket< JetByteTools::Socket::IPoolableDatagramSocket, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketCallback >, TAsyncSocket< JetByteTools::Socket::IPoolableStreamSocket, JetByteTools::Socket::IStreamSocketConnectionManager, JetByteTools::Socket::IStreamSocketCallback >, and TAsyncSocket< JetByteTools::Socket::IPoolableDatagramServerSocket, JetByteTools::Socket::IDatagramServerSocketConnectionManager, JetByteTools::Socket::IDatagramServerSocketCallback >.

virtual void SetUserPointer ( const UserDataIndex  index,
void *  pData 
) [pure virtual, inherited]

Update the data stored at the specified index as a void pointer.

Implemented in TAsyncSocket< JetByteTools::Socket::IPoolableDatagramSocket, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketCallback >, TAsyncSocket< JetByteTools::Socket::IPoolableStreamSocket, JetByteTools::Socket::IStreamSocketConnectionManager, JetByteTools::Socket::IStreamSocketCallback >, and TAsyncSocket< JetByteTools::Socket::IPoolableDatagramServerSocket, JetByteTools::Socket::IDatagramServerSocketConnectionManager, JetByteTools::Socket::IDatagramServerSocketCallback >.

virtual ULONG_PTR GetUserData ( const UserDataIndex  index  )  const [pure virtual, inherited]

Access the data stored at the specified index as an unsigned long.

Implemented in TAsyncSocket< JetByteTools::Socket::IPoolableDatagramSocket, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketCallback >, TAsyncSocket< JetByteTools::Socket::IPoolableStreamSocket, JetByteTools::Socket::IStreamSocketConnectionManager, JetByteTools::Socket::IStreamSocketCallback >, and TAsyncSocket< JetByteTools::Socket::IPoolableDatagramServerSocket, JetByteTools::Socket::IDatagramServerSocketConnectionManager, JetByteTools::Socket::IDatagramServerSocketCallback >.

virtual void SetUserData ( const UserDataIndex  index,
const ULONG_PTR  data 
) [pure virtual, inherited]

Update the data stored at the specified index as an unsigned long.

Implemented in TAsyncSocket< JetByteTools::Socket::IPoolableDatagramSocket, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketCallback >, TAsyncSocket< JetByteTools::Socket::IPoolableStreamSocket, JetByteTools::Socket::IStreamSocketConnectionManager, JetByteTools::Socket::IStreamSocketCallback >, and TAsyncSocket< JetByteTools::Socket::IPoolableDatagramServerSocket, JetByteTools::Socket::IDatagramServerSocketConnectionManager, JetByteTools::Socket::IDatagramServerSocketCallback >.

CNodeList::Node * Next (  )  const [inherited]

Return the next node in the list.

void Next ( Node pNext  )  [inherited]

Set the given node to be this nodes 'next node'.

void RemoveFromList (  )  [inherited]

If this node is currently in a list then it is removed.

bool InList ( const CNodeList list  )  const [inherited]

Returns true if this node is currently in the specified list.

bool InList (  )  const [inherited]

Returns true if this node is currently in any list.


Generated on Tue Oct 2 15:45:31 2007 for JetByte Tools - v5.2 by  doxygen 1.5.3