localsocketbase3bobcat
Base class for unix domain socket-constructing classes
Usage
#include <bobcat/localsocketbase>
Linking option: -lbobcat
Overview
This class is a base class for the FBB::LocalServerSocket and FBB::LocalClientSocket classes. Since it is designed as a base class, its constructor is protected. All its remaining members are protected as well.
Namespace
FBB
All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB.
Inherits from
-
Protected constructor
- o
-
LocalSocketBase():
The default constructor merely constructs a FBB::LocalSocketBase object. Before the object can be used, its open() member must be called first.
- o
-
LocalSocketBase(string const &name):
This constructor creates aLocalSocketBaseusing the file specified in name as the Unix domain socket interface. If the socket could not be constructed, anFBB::Exceptionexception is thrown.
Copy and move constructors (and assignment operators) are not available.
Protected member functions
- o
-
open(string const &name):
This member initiaizes aLocalSocketBaseobject following its construction using the default constructor. The file specified in name is used as the Unix domain socket interface. If the socket could not be constructed, anFBB::Exceptionexception is thrown.
- o
-
size_t size() const:
Accessor returning the size of the object’ssockaddr_un(address)
- o
-
int socket() const:
This accessor returns theFBB::LocalSocketBase’s socket value.
- o
-
sockaddr const *sockaddrPtr() const:
Accessor returning the pointer to the object’ssockaddr.
Examples
See the examples presented with the localclientsocket(3bobcat) and localserversocket(3bobcat) classes.
Files
bobcat/localsocketbase - defines the class interface
Bobcat project files
- o
-
https://fbb-git.gitlab.io/bobcat/: gitlab project page;
Debian Bobcat project files:
- o
-
libbobcat6: debian package containing the shared library, changelog and copyright note;
- o
-
libbobcat-dev: debian package containing the static library, headers, manual pages, and developer info;
Bobcat
Bobcat is an acronym of `Brokken’s Own Base Classes And Templates’.
Releases
10 releases since Debian 4.0 (Etch); the text changed 9 times.