socketbase.3bobcat

Langue: en

Version: 321876 (ubuntu - 08/07/09)

Section: 3 (Bibliothèques de fonctions)

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

o
SocketBase(size_t port):
This constructor creates a SocketBase to be used with ServerSocket-objects, listening on port. The proper completion of this constructor should be checked by calling the SocketBase::verify() member (see below).
o
SocketBase(std::string const &host, unit_16_t port):
This constructor creates a FBB::SocketBase to be used with a ClientSocket-object, connecting to hostname, at port `port'. The proper completion of this constructor should be checked by calling the SocketBase::verify() member (see below).
o
SocketBase(int socket, sockaddr_in const &address):
This constructor constructs a FBB::SocketBase object initializing its socket and FBB::InetAddress part from available external objects. The copy constructor is not available.

MEMBER FUNCTIONS

All members of FBB::InetAddress are available, as FBB::SocketBase inherits from this class.
o
bool debug() const:
This accessor returns true if the socket's debug (SO_DEBUG) socket option is active. It throws an FBB::Errno exception if the status of the debug option could not be determined.
o
bool reuse() const:
This accessor returns true if the socket's reuse (SO_REUSEADDR) socket option is active. It throws an FBB::Errno exception if the status of the reuse option could not be determined.
o
void setDebug(bool trueIsOn) const:
This member may be used to modify the socket's debug (SO_DEBUG) socket option. It throws an FBB::Errno exception if the socket's debug option could not be modified.
o
void setReuse(bool trueIsOn) const:
This member may be used to modify the socket's reuse (SO_REUSEADDR) socket option. It throws an FBB::Errno exception if the socket's reuse option could not be modified.
o
int socket() const:
This accessor returns the FBB::SocketBase's socket value.
o
void verify() const:
This operator throws an Errno exception if the first or second SocketBase constructor did not properly complete. It should be called before using any other Glob member.

EXAMPLE

To do

FILES

bobcat/socketbase - defines the class interface

SEE ALSO

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

BUGS

None Reported.

DISTRIBUTION FILES

o
bobcat_2.00.1-x.dsc: detached signature;
o
bobcat_2.00.1-x.tar.gz: source archive;
o
bobcat_2.00.1-x_i386.changes: change log;
o
libbobcat1_2.00.1-x_i386.deb: debian package holding the libraries;
o
libbobcat1-dev_2.00.1-x_i386.deb: debian package holding the libraries, headers and manual pages;
o
http://sourceforge.net/projects/bobcat: public archive location;

BOBCAT

Bobcat is an acronym of `Brokken's Own Base Classes And Templates'. This is free software, distributed under the terms of the GNU General Public License (GPL).

AUTHOR

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