FBB::SocketBase(3bobcat)

Base class for sockets
(libbobcat-dev_6.02.02)

2005-2022

NAME

FBB::SocketBase - Base class for socket-constructing classes

SYNOPSIS

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

DESCRIPTION

This class is a base class for the FBB::ServerSocket and FBB::ClientSocket classes. Since it is designed as a base class, all its constructors are protected.

NAMESPACE

FBB
All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB.

INHERITS FROM

FBB::InetAddress

PROTECTED CONSTRUCTORS

These constructors throw a std::exception if they could not properly complete.

The copy constructor and copy assignment operator are available. Both offer protected access rights.

PROTECTED MEMBER

MEMBER FUNCTIONS

All members of FBB::InetAddress are available, as FBB::SocketBase inherits from this class.

EXAMPLE

The classes FBB::ClientSocket and FBB::ServerSocket were derived from SocketBase. E.g.,
#ifndef INCLUDED_BOBCAT_CLIENTSOCKET_
#define INCLUDED_BOBCAT_CLIENTSOCKET_

#include <string>
#include <bobcat/socketbase>
#include <bobcat/exception>

namespace FBB
{

class ClientSocket: public SocketBase
{
    public:
                                // host may be address or name
        ClientSocket(std::string const &host, uint16_t port);

        int connect();          // returns fd (socket) to talk to the server
};

} // FBB

#endif

See the clientsocket(3bobcat) man-page for an example showing how to use FBB::ClientSocket.

FILES

bobcat/socketbase - defines the class interface

SEE ALSO

bobcat(7), clientsocket(3bobcat), inetaddress(3bobcat), localsocketbase(3bobcat), serversocket(3bobcat)

BUGS

None Reported.

BOBCAT PROJECT FILES

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).