Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

RefCountedSocketFactory Class Reference

#include <RefCountedSocketFactory.h>

Collaboration diagram for RefCountedSocketFactory:

Collaboration graph
[legend]
List of all members.

Public Member Functions

RefCountedSocket * get (MNSelector &sel, int port)
RefCountedSocket * get (MNSelector &sel, MNSocket &sock)
void release (void *v)
void del (RefCountedSocket *r)

Static Public Member Functions

RefCountedSocketFactoryfactory ()

Detailed Description

This factory maintains a table of all active RefCountedSockets, identified by their port. It is defined in the C++ file only, and it interacts with the class RefCountingSocket only. The factory is supposed to be used only once globally.


Member Function Documentation

void RefCountedSocketFactory::del RefCountedSocket *  r  ) 
 

RefCountedSocketFactory& RefCountedSocketFactory::factory  )  [static]
 

RefCountedSocket* RefCountedSocketFactory::get MNSelector sel,
MNSocket sock
 

Find, and if not found instantiate and add

RefCountedSocket* RefCountedSocketFactory::get MNSelector sel,
int  port
 

Find, and if not found instantiate and add

void RefCountedSocketFactory::release void *  v  ) 
 

It may be impossible to create RefCountedSocket for the port given in find(), e.g. because this socket is already bound elsewhere in the system. In that case, call this function after find() to remove the reserved dictionary entry. It must be called, or it will not be possible to delete the factory.

Parameters:
v The entry created by find() that must be release.


The documentation for this class was generated from the following file:
Generated on Sun Mar 6 13:36:09 2005 for Komssys by doxygen 1.3.8