

Public Types | |
| typedef unsigned short | UserDataIndex |
| typedef unsigned long | DataLength |
| typedef unsigned short | UserDataIndex |
| typedef char | TimeToLive |
Public Member Functions | |
| 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 | AbortConnectionIfManagedBy (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. | |
| virtual void | Accepted ()=0 |
| virtual void | Connected ()=0 |
| virtual void | WriteCompleted ()=0 |
| virtual SOCKET | GetSocket () const =0 |
| virtual bool | HandleError (const DWORD lastError)=0 |
| virtual void | RecvFrom ()=0 |
| virtual void | RecvFrom (JetByteTools::IO::IBuffer *pBuffer)=0 |
| virtual bool | TryRecvFrom ()=0 |
| virtual bool | TryRecvFrom (JetByteTools::IO::IBuffer *pBuffer)=0 |
| virtual void | SendTo (const IAddress &address, const char *pData, const DataLength dataLength)=0 |
| virtual void | SendTo (const IAddress &address, const BYTE *pData, const DataLength dataLength)=0 |
| virtual void | SendTo (const IAddress &address, JetByteTools::IO::IBuffer &buffer)=0 |
| virtual bool | TrySendTo (const IAddress &address, const char *pData, const DataLength dataLength)=0 |
| virtual bool | TrySendTo (const IAddress &address, const BYTE *pData, const DataLength dataLength)=0 |
| virtual bool | TrySendTo (const IAddress &address, JetByteTools::IO::IBuffer &buffer)=0 |
| virtual bool | TryRead ()=0 throw () |
| Attempts to read from the connection. Returns false if the connection is closed. | |
| virtual bool | TryRead (JetByteTools::IO::IBuffer &buffer)=0 |
| Attempts to read from the connection. Returns false if the connection is closed. Note that this CAN throw an exception if the supplied buffer doesn't have any space left in it. | |
| virtual bool | TryRead (JetByteTools::IO::IBuffer *pBuffer)=0 |
| Attempts to read from the connection. Returns false if the connection is closed. Note that this CAN throw an exception if the supplied buffer doesn't have any space left in it. | |
| virtual bool | TryWrite (const char *pData, const DataLength dataLength)=0 throw () |
| Attempts to write to the connection. Returns false if the connection is closed. | |
| virtual bool | TryWrite (const BYTE *pData, const DataLength dataLength)=0 throw () |
| Attempts to write to the connection. Returns false if the connection is closed. | |
| virtual bool | TryWrite (JetByteTools::IO::IBuffer &buffer)=0 throw () |
| Attempts to write to the connection. Returns false if the connection is closed. | |
| virtual void | Shutdown ()=0 |
| virtual void | Shutdown (const ShutdownHow how)=0 |
| virtual void | AbortConnection ()=0 |
| virtual CAddress | GetLocalAddress () const =0 |
| virtual CAddress | GetRemoteAddress () const =0 |
| virtual void | AddRef ()=0 |
| virtual void | Release ()=0 |
| virtual ConnectionDirection | GetConnectionDirection () const =0 |
| virtual void | Read ()=0 |
| virtual void | Read (IBuffer &buffer)=0 |
| virtual void | Read (IBuffer *pBuffer)=0 |
| virtual void | Write (const char *pData, const DataLength dataLength)=0 |
| virtual void | Write (const BYTE *pData, const DataLength dataLength)=0 |
| virtual void | Write (IBuffer &buffer)=0 |
| virtual void | JoinMulticastGroup (const IAddress &groupAddress, const IAddress &interfaceAddress)=0 |
| virtual void | BlockMulticastGroupSource (const IAddress &groupAddress, const IAddress &interfaceAddress, const IAddress &sourceAddress)=0 |
| virtual void | UnblockMulticastGroupSource (const IAddress &groupAddress, const IAddress &interfaceAddress, const IAddress &sourceAddress)=0 |
| virtual void | LeaveMulticastGroup (const IAddress &groupAddress, const IAddress &interfaceAddress)=0 |
| virtual void | IncludeMulticastSource (const IAddress &groupAddress, const IAddress &interfaceAddress, const IAddress &sourceAddress)=0 |
| virtual void | ExcludeMulticastSource (const IAddress &groupAddress, const IAddress &interfaceAddress, const IAddress &sourceAddress)=0 |
| virtual void | SetMulticastSendInterface (const IAddress &interfaceAddress, const TimeToLive multicastTTL=1, const bool enableLoopback=false)=0 |
| virtual void | OnError (const DWORD lastError)=0 |
| Called when an error has occurred before the operation can be handled. | |
| virtual void | HandleOperation (IBuffer *pBuffer, const DWORD ioSize, const DWORD lastError)=0 |
| Called when a buffer has an operation that needs to be handled. | |
Protected Member Functions | |
| ~IPoolableDatagramSocket () | |
| We never delete instances of this interface; you must manage the lifetime of the class that implements it. | |
typedef unsigned short UserDataIndex [inherited] |
typedef unsigned long DataLength [inherited] |
typedef unsigned short UserDataIndex [inherited] |
typedef char TimeToLive [inherited] |
| ~IPoolableDatagramSocket | ( | ) | [inline, protected] |
We never delete instances of this interface; you must manage the lifetime of the class that implements it.
| virtual void Attach | ( | IPoolableSocketManager & | manager, | |
| ISocketCallback & | callback, | |||
| SOCKET | socket | |||
| ) | [pure virtual, inherited] |
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 AbortConnectionIfManagedBy | ( | const IPoolableSocketManager & | manager | ) | [pure virtual, inherited] |
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.
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.
| virtual void Accepted | ( | ) | [pure virtual, inherited] |
| virtual void Connected | ( | ) | [pure virtual, inherited] |
| virtual void WriteCompleted | ( | ) | [pure virtual, inherited] |
| virtual SOCKET GetSocket | ( | ) | const [pure virtual, inherited] |
| virtual bool HandleError | ( | const DWORD | lastError | ) | [pure virtual, inherited] |
| virtual void RecvFrom | ( | ) | [pure virtual, inherited] |
| virtual void RecvFrom | ( | JetByteTools::IO::IBuffer * | pBuffer | ) | [pure virtual, inherited] |
| virtual bool TryRecvFrom | ( | ) | [pure virtual, inherited] |
| virtual bool TryRecvFrom | ( | JetByteTools::IO::IBuffer * | pBuffer | ) | [pure virtual, inherited] |
| virtual void SendTo | ( | const IAddress & | address, | |
| const char * | pData, | |||
| const DataLength | dataLength | |||
| ) | [pure virtual, inherited] |
| virtual void SendTo | ( | const IAddress & | address, | |
| const BYTE * | pData, | |||
| const DataLength | dataLength | |||
| ) | [pure virtual, inherited] |
| virtual void SendTo | ( | const IAddress & | address, | |
| JetByteTools::IO::IBuffer & | buffer | |||
| ) | [pure virtual, inherited] |
| virtual bool TrySendTo | ( | const IAddress & | address, | |
| const char * | pData, | |||
| const DataLength | dataLength | |||
| ) | [pure virtual, inherited] |
| virtual bool TrySendTo | ( | const IAddress & | address, | |
| const BYTE * | pData, | |||
| const DataLength | dataLength | |||
| ) | [pure virtual, inherited] |
| virtual bool TrySendTo | ( | const IAddress & | address, | |
| JetByteTools::IO::IBuffer & | buffer | |||
| ) | [pure virtual, inherited] |
| virtual bool TryRead | ( | JetByteTools::IO::IBuffer & | buffer | ) | [pure virtual, inherited] |
Attempts to read from the connection. Returns false if the connection is closed. Note that this CAN throw an exception if the supplied buffer doesn't have any space left in it.
Implemented in TAsyncSocket< JetByteTools::Socket::IPoolableDatagramSocket, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketCallback >, and TAsyncSocket< JetByteTools::Socket::IPoolableStreamSocket, JetByteTools::Socket::IStreamSocketConnectionManager, JetByteTools::Socket::IStreamSocketCallback >.
| virtual bool TryRead | ( | JetByteTools::IO::IBuffer * | pBuffer | ) | [pure virtual, inherited] |
Attempts to read from the connection. Returns false if the connection is closed. Note that this CAN throw an exception if the supplied buffer doesn't have any space left in it.
Implemented in TAsyncSocket< JetByteTools::Socket::IPoolableDatagramSocket, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketCallback >, and TAsyncSocket< JetByteTools::Socket::IPoolableStreamSocket, JetByteTools::Socket::IStreamSocketConnectionManager, JetByteTools::Socket::IStreamSocketCallback >.
| virtual void Shutdown | ( | ) | [pure virtual, inherited] |
Implemented in TAsyncSocket< JetByteTools::Socket::IPoolableDatagramSocket, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketCallback >, and TAsyncSocket< JetByteTools::Socket::IPoolableStreamSocket, JetByteTools::Socket::IStreamSocketConnectionManager, JetByteTools::Socket::IStreamSocketCallback >.
| virtual void Shutdown | ( | const ShutdownHow | how | ) | [pure virtual, inherited] |
Implemented in TAsyncSocket< JetByteTools::Socket::IPoolableDatagramSocket, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketCallback >, and TAsyncSocket< JetByteTools::Socket::IPoolableStreamSocket, JetByteTools::Socket::IStreamSocketConnectionManager, JetByteTools::Socket::IStreamSocketCallback >.
| virtual void AbortConnection | ( | ) | [pure virtual, inherited] |
Implemented in TAsyncSocket< JetByteTools::Socket::IPoolableDatagramSocket, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketCallback >, and TAsyncSocket< JetByteTools::Socket::IPoolableStreamSocket, JetByteTools::Socket::IStreamSocketConnectionManager, JetByteTools::Socket::IStreamSocketCallback >.
| virtual CAddress GetLocalAddress | ( | ) | const [pure virtual, inherited] |
Implemented in TAsyncSocket< JetByteTools::Socket::IPoolableDatagramSocket, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketCallback >, and TAsyncSocket< JetByteTools::Socket::IPoolableStreamSocket, JetByteTools::Socket::IStreamSocketConnectionManager, JetByteTools::Socket::IStreamSocketCallback >.
| virtual CAddress GetRemoteAddress | ( | ) | const [pure virtual, inherited] |
Implemented in TAsyncSocket< JetByteTools::Socket::IPoolableDatagramSocket, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketCallback >, and TAsyncSocket< JetByteTools::Socket::IPoolableStreamSocket, JetByteTools::Socket::IStreamSocketConnectionManager, JetByteTools::Socket::IStreamSocketCallback >.
| virtual void AddRef | ( | ) | [pure virtual, inherited] |
Implemented in TAsyncSocket< JetByteTools::Socket::IPoolableDatagramSocket, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketCallback >, and TAsyncSocket< JetByteTools::Socket::IPoolableStreamSocket, JetByteTools::Socket::IStreamSocketConnectionManager, JetByteTools::Socket::IStreamSocketCallback >.
| virtual void Release | ( | ) | [pure virtual, inherited] |
Implemented in TAsyncSocket< JetByteTools::Socket::IPoolableDatagramSocket, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketCallback >, and TAsyncSocket< JetByteTools::Socket::IPoolableStreamSocket, JetByteTools::Socket::IStreamSocketConnectionManager, JetByteTools::Socket::IStreamSocketCallback >.
| virtual ConnectionDirection GetConnectionDirection | ( | ) | const [pure virtual, inherited] |
Implemented in TAsyncSocket< JetByteTools::Socket::IPoolableDatagramSocket, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketCallback >, and TAsyncSocket< JetByteTools::Socket::IPoolableStreamSocket, JetByteTools::Socket::IStreamSocketConnectionManager, JetByteTools::Socket::IStreamSocketCallback >.
| virtual void Read | ( | ) | [pure virtual, inherited] |
Implemented in TAsyncSocket< JetByteTools::Socket::IPoolableDatagramSocket, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketCallback >, and TAsyncSocket< JetByteTools::Socket::IPoolableStreamSocket, JetByteTools::Socket::IStreamSocketConnectionManager, JetByteTools::Socket::IStreamSocketCallback >.
| virtual void Read | ( | IBuffer & | buffer | ) | [pure virtual, inherited] |
Implemented in TAsyncSocket< JetByteTools::Socket::IPoolableDatagramSocket, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketCallback >, and TAsyncSocket< JetByteTools::Socket::IPoolableStreamSocket, JetByteTools::Socket::IStreamSocketConnectionManager, JetByteTools::Socket::IStreamSocketCallback >.
| virtual void Read | ( | IBuffer * | pBuffer | ) | [pure virtual, inherited] |
Implemented in TAsyncSocket< JetByteTools::Socket::IPoolableDatagramSocket, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketCallback >, and TAsyncSocket< JetByteTools::Socket::IPoolableStreamSocket, JetByteTools::Socket::IStreamSocketConnectionManager, JetByteTools::Socket::IStreamSocketCallback >.
| virtual void Write | ( | const char * | pData, | |
| const DataLength | dataLength | |||
| ) | [pure virtual, inherited] |
Implemented in TAsyncSocket< JetByteTools::Socket::IPoolableDatagramSocket, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketCallback >, and TAsyncSocket< JetByteTools::Socket::IPoolableStreamSocket, JetByteTools::Socket::IStreamSocketConnectionManager, JetByteTools::Socket::IStreamSocketCallback >.
| virtual void Write | ( | const BYTE * | pData, | |
| const DataLength | dataLength | |||
| ) | [pure virtual, inherited] |
Implemented in TAsyncSocket< JetByteTools::Socket::IPoolableDatagramSocket, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketCallback >, and TAsyncSocket< JetByteTools::Socket::IPoolableStreamSocket, JetByteTools::Socket::IStreamSocketConnectionManager, JetByteTools::Socket::IStreamSocketCallback >.
| virtual void Write | ( | IBuffer & | buffer | ) | [pure virtual, inherited] |
Implemented in TAsyncSocket< JetByteTools::Socket::IPoolableDatagramSocket, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketCallback >, and TAsyncSocket< JetByteTools::Socket::IPoolableStreamSocket, JetByteTools::Socket::IStreamSocketConnectionManager, JetByteTools::Socket::IStreamSocketCallback >.
| virtual void JoinMulticastGroup | ( | const IAddress & | groupAddress, | |
| const IAddress & | interfaceAddress | |||
| ) | [pure virtual, inherited] |
Implemented in CDatagramSocketServer.
| virtual void BlockMulticastGroupSource | ( | const IAddress & | groupAddress, | |
| const IAddress & | interfaceAddress, | |||
| const IAddress & | sourceAddress | |||
| ) | [pure virtual, inherited] |
Implemented in CDatagramSocketServer.
| virtual void UnblockMulticastGroupSource | ( | const IAddress & | groupAddress, | |
| const IAddress & | interfaceAddress, | |||
| const IAddress & | sourceAddress | |||
| ) | [pure virtual, inherited] |
Implemented in CDatagramSocketServer.
| virtual void LeaveMulticastGroup | ( | const IAddress & | groupAddress, | |
| const IAddress & | interfaceAddress | |||
| ) | [pure virtual, inherited] |
Implemented in CDatagramSocketServer.
| virtual void IncludeMulticastSource | ( | const IAddress & | groupAddress, | |
| const IAddress & | interfaceAddress, | |||
| const IAddress & | sourceAddress | |||
| ) | [pure virtual, inherited] |
Implemented in CDatagramSocketServer.
| virtual void ExcludeMulticastSource | ( | const IAddress & | groupAddress, | |
| const IAddress & | interfaceAddress, | |||
| const IAddress & | sourceAddress | |||
| ) | [pure virtual, inherited] |
Implemented in CDatagramSocketServer.
| virtual void SetMulticastSendInterface | ( | const IAddress & | interfaceAddress, | |
| const TimeToLive | multicastTTL = 1, |
|||
| const bool | enableLoopback = false | |||
| ) | [pure virtual, inherited] |
| virtual void OnError | ( | const DWORD | lastError | ) | [pure virtual, inherited] |
Called when an error has occurred before the operation can be handled.
Implemented in CDatagramSocketServer.
| virtual void HandleOperation | ( | IBuffer * | pBuffer, | |
| const DWORD | ioSize, | |||
| const DWORD | lastError | |||
| ) | [pure virtual, inherited] |
Called when a buffer has an operation that needs to be handled.
Implemented in CDatagramSocketServer, 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 >.
1.5.3