Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
P6R::p6IEventQ Interface Referenceabstract

#include <p6eventq.h>

Inherits P6R::p6ICom.

Public Member Functions

virtual P6INT32 addref (void)=0
 
virtual P6R::P6ERR enableLogging (P6BOOL bEnable)=0
 
virtual P6R::P6ERR getBufferFactory (p6IIoBufferFactory **ppFactory)=0
 
virtual P6R::P6ERR getName (P6WCHAR *pBuffer, P6INT32 cBuffer)=0
 
virtual P6R::P6ERR getNextEvent (P6EVENTTYPE *pnType, p6ICom **ppIoIface, p6IIoBuffer **ppIoBuffer, P6IOCONTEXT **ppIoContext, P6VOID **ppHandleContext, P6INTERVAL tTimeout)=0
 
virtual P6R::P6ERR initialize (const P6WCHAR *pwszQueueName, const P6WCHAR *pwszEventSourceDefFile, p6IIoBufferFactory *pFactory, p6IEventQHooks *pHooks, P6EVENTQFLAG fFlags)=0
 
virtual P6R::P6ERR postEvent (P6EVENTTYPE nType, P6QPRIORITY nPriority, p6ICom *pIoIface, p6IIoBuffer *pIoBuffer, P6IOCONTEXT *pIoContext, P6VOID *pHandleContext)=0
 
virtual P6R::P6ERR queryInterface (const P6R::P6IID &iid, P6VOID **ppIface)=0
 
virtual P6INT32 release (void)=0
 
virtual P6R::P6ERR start (void)=0
 
virtual P6R::P6ERR stop (void)=0
 

Detailed Description

Asychronous event queue interface.

This interface provides an unified asynchronous event queue which an application can use to receive I/O notifications (file and socket) as well as timer and user generated notifications. The event queue is an effcient means of processing multiple asynchronous requests on multi-processor (multi-core) systems. This interface allows large numbers of asynchronous requests to be processed concurrently by a small pre-allocated thread pool. The event queue can also be extended to handle any type of asynchronous notification by implementing additional p6IEventSource's. The event queue will provide emulated asynchronous I/O on platforms that do not support true asynchronous I/O.

How to use the event queue

The application associates I/O interfaces with the event queue by calling the queues associate() method. I/O operations are then initiated by using the queue's postXXXXX() methods (postRead(), postWrite(), etc.), and the resulting event notifications are retrieved using the getNetEvent() method.

Note
Solaris File Descriptors Solaris 10 10/08 defaults to 65536 (hard limit) descriptors per process. The runtime will automatically increase the soft limit to equal the hard limit on startup. The "hard" and "soft" limits may need to be increased to allow a larger number of simultaneous connections. The number of maximum file descriptors available can be set in /etc/system:
  • set rlim_fd_max=<the maximum value>
  • set rlim_fd_cur=<default per process>
Once these are set, the system will need to be rebooted for the changes to take affect.
Linux File Descriptors Linux Defaults to 1024 per process. One way to increase this is to modify /etc/security/limits.conf and /etc/rc.d/rc.local as follows. In /etc/security/limits.conf add the following:
  • * soft nofile <handle count>
  • * hard nofile <handle count>
Change <handle count> to an integer represting the number of available file descriptor you want to be available (eg. 260000). Next edit /etc/rc.d/rc.local and append a line similar to the following:
  • echo 400000 > /proc/sys/fs/file-max
Where 400000 is the number of available file handles system-wide. Now reboot you system to enable the changes.
Windows File Descriptors Windows does not arbitrarily limit handles, they are limited by resources such as memory etc.
See Also
P6R::p6IEventQIO, P6R::p6IEventQTimer P6R::p6IEventQHooks, P6R::p6IIoBufferFactory, P6R::P6EVENTQFLAG

Definition at line 239 of file p6eventq.h.


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