System documentation of the GNU Image-Finding Tool

Public Member Functions | Protected Attributes | List of all 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

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
 
- Public Member Functions inherited from CSocket
 CSocket ()
 constructor
 
 ~CSocket ()
 destroy this: close the socket
 
int getSocketDescriptor () const
 get the descriptor of the socket
 
void setServeFunction (CServeFunction *inServeFunction)
 Serve from the socket that accepted.
 
virtual void serveStream (int)
 serve to this socket
 

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)
 
struct sockaddr_in mSocketAddress
 the socket structure of the local socket
 
- Protected Attributes inherited from CSocket
bool mIsInitialized
 has this been initialized ?
 
int mSocketDescriptor
 int
 
CServeFunctionmServeFunction
 

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