Rudiments

- Main Page
- Classes

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
unixsocketutil Class Reference

Inherited by unixsocketclient`[private]`, and unixsocketserver`[private]`.

## Public Member Functions
| unixsocketutil ()
| unixsocketutil (const unixsocketutil &u)
unixsocketutil & | operator= (const unixsocketutil &u)
virtual | ~unixsocketutil ()
void | initialize (const char *filename)
uint16_t | filenameToPort (const char *filename)

## Detailed Description

The unixsocketutil class is just a base class for other classes that use unix sockets. It is unlikely to need to be used directly.

## Constructor & Destructor Documentation

unixsocketutil::unixsocketutil | ( |  | ) |

Creates an instance of the unixsocketutil class.

unixsocketutil::unixsocketutil | ( | const unixsocketutil & | u | ) |

Creates an instance of the unixsocketutil class that is a copy of "u".

virtual unixsocketutil::~unixsocketutil | ( |  | ) |
| virtual

Deletes this instance of the unixsocketutill class.

## Member Function Documentation

uint16_t unixsocketutil::filenameToPort | ( | const char * | filename | ) |

Converts "filename" to a port number for faking unix sockets. If the filename starts with a number, then that number is used. Otherwise it starts with 10240 and adds the ascii values of each character in the name. The port number is not guaranteed to be unique for unique names unless those names are based on unique numbers.

void unixsocketutil::initialize | ( | const char * | filename | ) |

Initializes the class to use "filename". This is not directly useful within this class but child classes may use the value to decide where to connect to or what to listen on.

unixsocketutil& unixsocketutil::operator= | ( | const unixsocketutil & | u | ) |

Makes this instance of the unixsocketutil class identical to "u".