System documentation of the GNU Image-Finding Tool

Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members

CTCPSocket Class Reference

A structure that opens/closes a TCP socket for a given path and sets the file permissions to 0600. More...

#include <CTCPSocket.h>

Inheritance diagram for CTCPSocket:

CSocket List of all members.

Public Member Functions

 CTCPSocket ()
 constructor

 CTCPSocket (const string &inHost, int inPort)
 constructor: copy the path, otherwise do nothing

 ~CTCPSocket ()
 destroy this: close the socket

bool listenAtHostPort (const string &inHost, int inSocket)
 set the path of the TCP socket and listen to it

string getHost () const
 get the hostname it's listening to of the socket

int getPort () const
 get the hostname it's listening to of the socket

bool acceptAndServe ()
 accept this socket and serve

 operator bool () const

Protected Attributes

bool mIsInitialized
 has this been initialized ?

string mHost
 the path to the socket (visible in the file system)

int mPort
 the path to the socket (visible in the file system)

sockaddr_in mSocketAddress
 the socket structure of the local socket


Detailed Description

A structure that opens/closes a TCP socket for a given path and sets the file permissions to 0600.

This class will be used with select to be the entry to the local search engine.

See also:
: CMultiServer


The documentation for this class was generated from the following file:
Need for discussion? Want to contribute? Contact
help-gift@gnu.org Generated using Doxygen