LOCALSOCKETBASE(3bobcat)

πŸ’– LOCALSOCKETBASE β€” the base class for Unix Domain socket girlies πŸ’–

okay so bestie, pull up a chair, we're talking about FBB::LocalSocketBase from the bobcat manual (section 3bobcat), and it's giving "I'm the blueprint, not the building" energy. This is the base class for Unix Domain socket-constructing classes β€” no cap, that's literally what the NAME says. πŸ’…


✨ SYNOPSIS ✨

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

like yes, that's the whole vibe. include the header, link with -lbobcat, go be a socket. πŸ¦‹


🌸 DESCRIPTION 🌸

So this class is a base class for FBB::LocalServerSocket and FBB::LocalClientSocket. It's not out here trying to be the main character of your program β€” it's the parent, the foundation, the blueprint behind the scenes. 🧚

Because it's designed to be a base class, its constructor is protected. And not just the constructor, bestie β€” all its remaining members are protected too. So you cannot just waltz in and make one directly, that's not the move here. It's for the derived classes to build on. Periodt.


πŸ’œ NAMESPACE πŸ’œ

FBB

Every constructor, member, operator and manipulator mentioned in this man-page lives in the namespace FBB. That's the house they all live in. 🏠


πŸŽ€ INHERITS FROM πŸŽ€

-

(yeah. nothing. it's at the top of the family tree. the matriarch. iconic behavior.)


πŸ’… PROTECTED CONSTRUCTOR πŸ’…

  • LocalSocketBase() β€” the default constructor. It just constructs an FBB::LocalSocketBase object, simple as that. ✨ Important though: before you can actually use the object, you have to call its open() member first. Don't skip that step, bestie, it's not optional.
  • LocalSocketBase(string const &name) β€” this one creates a LocalSocketBase using the file specified in name as the Unix domain socket interface. And if the socket could not be constructed? πŸ‘€ An FBB::Exception exception gets thrown. So wrap accordingly.
Copy and move constructors (and assignment operators) are not available. Not a thing. Don't look for them. 🚫

πŸ¦‹ PROTECTED MEMBER FUNCTIONS πŸ¦‹

  • open(string const &name) β€” this member initiaizes a LocalSocketBase object after you've constructed it with the default constructor. The file specified in name is what gets used as the Unix domain socket interface. And if the socket could not be constructed β€” you guessed it β€” an FBB::Exception exception is thrown. 😭
  • size_t size() const β€” the accessor, returning the size of the object's sockaddr_un (address). It's giving "how big is my address tho". πŸ“
  • int socket() const β€” this accessor returns the FBB::LocalSocketBase's socket value. Yes, it just hands you the int. Slay.
  • sockaddr const *sockaddrPtr() const β€” accessor returning the pointer to the object's sockaddr. A pointer! To the sockaddr! πŸ”₯

🌈 EXAMPLE 🌈

See the examples presented with the localclientsocket(3bobcat) and localserversocket(3bobcat) classes.

(they've got the real receipts, go look πŸ’–)


πŸ“ FILES πŸ“

bobcat/localsocketbase β€” defines the class interface


⭐ SEE ALSO ⭐

bobcat(7), localclientsocket(3bobcat), localserversocket(3bobcat), socketbase(3bobcat)


πŸ’€ BUGS πŸ’€

None Reported.

(clean sheet, bestie. not a single one on the record. πŸ‘‘)


🫢 BOBCAT PROJECT FILES 🫢

Debian Bobcat project files:

  • libbobcat6: debian package containing the shared library, changelog and copyright note;
  • 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.

(an acronym AND a cute animal? double threat fr fr 🐱)


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


🌸 AUTHOR 🌸

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


okay that's the whole page, bestie! this one shipped as libbobcat-dev_6.15.01, dated 2005-2026, and it's part of the FBB::...tBase(3bobcat) situation. go forth and subclass responsibly πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from