TSocketMultiplexerMethodJob< T > Class Template Reference

Use a method as a socket multiplexer job. More...

#include <TSocketMultiplexerMethodJob.h>

Inherits ISocketMultiplexerJob.

Collaboration diagram for TSocketMultiplexerMethodJob< T >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef ISocketMultiplexerJob
*(T::* 
Method )(ISocketMultiplexerJob *, bool, bool, bool)

Public Member Functions

 TSocketMultiplexerMethodJob (T *object, Method method, CArchSocket socket, bool readable, bool writeable)
 run() invokes object->method(arg)
virtual ISocketMultiplexerJobrun (bool readable, bool writable, bool error)
 Handle socket event.
virtual CArchSocket getSocket () const
 Get the socket.
virtual bool isReadable () const
 Check for interest in readability.
virtual bool isWritable () const
 Check for interest in writability.

Detailed Description

template<class T>
class TSocketMultiplexerMethodJob< T >

Use a method as a socket multiplexer job.

A socket multiplexer job class that invokes a member function.

Definition at line 26 of file TSocketMultiplexerMethodJob.h.


Member Function Documentation

template<class T >
CArchSocket TSocketMultiplexerMethodJob< T >::getSocket (  )  const [inline, virtual]

Get the socket.

Return the socket to multiplex

Implements ISocketMultiplexerJob.

Definition at line 87 of file TSocketMultiplexerMethodJob.h.

template<class T >
bool TSocketMultiplexerMethodJob< T >::isReadable (  )  const [inline, virtual]

Check for interest in readability.

Return true if the job is interested in being run if the socket becomes readable.

Implements ISocketMultiplexerJob.

Definition at line 95 of file TSocketMultiplexerMethodJob.h.

template<class T >
bool TSocketMultiplexerMethodJob< T >::isWritable (  )  const [inline, virtual]

Check for interest in writability.

Return true if the job is interested in being run if the socket becomes writable.

Implements ISocketMultiplexerJob.

Definition at line 103 of file TSocketMultiplexerMethodJob.h.

template<class T >
ISocketMultiplexerJob * TSocketMultiplexerMethodJob< T >::run ( bool  readable,
bool  writable,
bool  error 
) [inline, virtual]

Handle socket event.

Called by a socket multiplexer when the socket becomes readable, writable, or has an error. It should return itself if the same job can continue to service events, a new job if the socket must be serviced differently, or NULL if the socket should no longer be serviced. The socket is readable if readable is true, writable if writable is true, and in error if error is true.

This call must not attempt to directly change the job for this socket by calling addSocket() or removeSocket() on the multiplexer. It must instead return the new job. It can, however, add or remove jobs for other sockets.

Implements ISocketMultiplexerJob.

Definition at line 76 of file TSocketMultiplexerMethodJob.h.


The documentation for this class was generated from the following file:

Generated on 12 Nov 2010 for synergy-plus by  doxygen 1.6.1