A structure that opens/closes a domain socket for a given path and sets the file permissions to 0600. More...
#include <CDomainSocket.h>
Public Member Functions | |
| CDomainSocket () | |
| constructor | |
| CDomainSocket (const string &inPath) | |
| constructor: copy the path, otherwise do nothing | |
| ~CDomainSocket () | |
| destroy this: close the socket | |
| bool | listenToPath (const string &inPath) |
| set the path of the domain socket and listen to it | |
| string | getPath () const |
| get the path of the socket | |
| virtual void | serveStream (int) |
| Serve from the socket that accepted. | |
| virtual bool | acceptAndServe () |
| accept this socket and serve | |
| operator bool () const | |
Public Member Functions inherited from CSocket | |
| CSocket () | |
| constructor | |
| ~CSocket () | |
| destroy this: close the socket | |
| int | getSocketDescriptor () const |
| get the descriptor of the socket | |
| void | setServeFunction (CServeFunction *inServeFunction) |
| Serve from the socket that accepted. | |
Protected Attributes | |
| bool | mIsInitialized |
| has this been initialized ? | |
| string | mPath |
| the path to the socket (visible in the file system) | |
| struct sockaddr_un | mSocketStructure |
| the socket structure of the local socket | |
Protected Attributes inherited from CSocket | |
| bool | mIsInitialized |
| has this been initialized ? | |
| int | mSocketDescriptor |
| int | |
| CServeFunction * | mServeFunction |
A structure that opens/closes a domain socket for a given path and sets the file permissions to 0600.
This class will be used with select to be the entry to the local search engine.