Rudiments
Public Member Functions | List of all members
unixsocketutil Class Reference

Inherited by unixsocketclient, and unixsocketserver [private].

Public Member Functions

 unixsocketutil ()
 
virtual ~unixsocketutil ()
 
void setFileName (const char *filename)
 
const char * getFileName ()
 
uint16_t convertFileNameToPort (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::unixsocketutil ( )

Creates an instance of the unixsocketutil class.

◆ ~unixsocketutil()

virtual unixsocketutil::~unixsocketutil ( )
virtual

Deletes this instance of the unixsocketutill class.

Member Function Documentation

◆ convertFileNameToPort()

uint16_t unixsocketutil::convertFileNameToPort ( 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.

◆ getFileName()

const char* unixsocketutil::getFileName ( )

Returns the filename that connect() will attempt to connect to, or that listen() will listen on.

◆ setFileName()

void unixsocketutil::setFileName ( const char *  filename)

Sets the filename that connect() will attempt to connect to, or that listen() will listen on.

This is not directly useful within this instance but child classes may use this value.