---
name: "localsocketbase"
section: "3bobcat"
platform: "linux"
package: "libbobcat-dev"
version: "6.07.01-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/localsocketbase"
---

# localsocketbase(3bobcat)

Base class for Unix Domain socket-constructing classes

## NAME

FBB::LocalSocketBase - Base class for Unix Domain socket-constructing classes

## SYNOPSIS

**#include \<bobcat/localsocketbase\>**\
 Linking option: *-lbobcat*

## DESCRIPTION

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 a **LocalSocketBase** using the file specified in *name* as the Unix domain socket interface.  If the socket could not be constructed, an **FBB::Exception** exception is thrown.

Copy and move constructors (and assignment operators) are not available.

## PROTECTED MEMBER FUNCTIONS

- o

  **open(string const &name)**:\
   This member initiaizes a **LocalSocketBase** object 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, an **FBB::Exception** exception is thrown.

- o

  **size\_t size() const**:\
   Accessor returning the size of the object’s **sockaddr\_un** (address)

- o

  **int socket() const**:\
   This accessor returns the **FBB::LocalSocketBase**’s socket value.

- o

  **sockaddr const \*sockaddrPtr() const**:\
   Accessor returning the pointer to the object’s **sockaddr**.

## EXAMPLE

See the examples presented with the [**localclientsocket**(3bobcat)](/localclientsocket/3bobcat.md) and [**localserversocket**(3bobcat)](/localserversocket/3bobcat.md) classes.

## FILES

*bobcat/localsocketbase* - defines the class interface

## SEE ALSO

[**bobcat**(7)](/bobcat/7.md), [**localclientsocket**(3bobcat)](/localclientsocket/3bobcat.md), [**localserversocket**(3bobcat)](/localserversocket/3bobcat.md), [**socketbase**(3bobcat)](/socketbase/3bobcat.md)

## BUGS

None Reported.

## 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’.

## COPYRIGHT

This is free software, distributed under the terms of the GNU General Public License (GPL).

## AUTHOR

Frank B. Brokken (**f.b.brokken@rug.nl**).
