ArServerSimpleOpener Class Reference

#include <ArServerSimpleOpener.h>

List of all members.


Detailed Description

Set up and open an ArNetworking server.

Some program command line options affect behavior:

To set the port the server uses use '-serverPort serverPortNumber' or '-sp serverPortNumber'. To set the file to look in for user information use '-userInfo fileName' or "-ui fileName'. To log out the user information use '-logUserInfo' or 'lui'. To log out the command groups use '-logCommandGroups' or '-lcg'. To set the key used for the server (that the client has to know to connect if using user and password) use '-serverInfoFile file'. With a file that has in it 'serverKey serverKey'. You should obviously make sure no one you don't want to know that server key can read your file that it is in.

For more details about all of these options see ArServerBase.

See also:
ArServerBase


Public Member Functions

 ArServerSimpleOpener (ArArgumentParser *parser, const char *prefix="")
 Constructor.
bool checkAndLog (void) const
 Logs the things requested for logging, may check things later.
bool didOpenFail (void)
 Returns true if the open failed because it couldn't open.
int getPort ()
void logOptions (void) const
 Log the options the simple connector has.
bool open (ArServerBase *server, const char *baseDirectory="", int secondsToTryFor=240)
 Function to open up the server.
bool parseArgs (ArArgumentParser *parser)
 Function to parse the arguments given in an arbitrary parser.
bool parseArgs (void)
 Function to parse the arguments given in the constructor.
bool parseFile (const char *fileName)
 Parses the file for holding the server key.
void setServerTcpOnly (bool serverTcpOnly)
 Sets the tcpOnly flag.
bool wasUserFileBad (void)
 Returns true if the open failed because of a bad user file.
 ~ArServerSimpleOpener ()
 Destructor.

Protected Member Functions

bool fileServerKeyCallback (ArArgumentBuilder *arg)
void logOptionsWithOutPrefix (void) const
void logOptionsWithPrefix (void) const
bool parseArgsWithOutPrefix (ArArgumentParser *parser)
bool parseArgsWithPrefix (ArArgumentParser *parser)
void reset (void)

Protected Attributes

bool myBadUserFile
ArFileParser myFileParser
ArRetFunctor1C< bool, ArServerSimpleOpener,
ArArgumentBuilder * > 
myFileServerKeyCB
bool myLogCommandGroups
ArConstFunctorC< ArServerSimpleOpenermyLogOptionsCB
bool myLogUserInfo
bool myOpenFailed
const char * myOpenOnIP
bool myOwnParser
ArRetFunctorC< bool, ArServerSimpleOpenermyParseArgsCB
ArArgumentParsermyParser
std::string myPrefix
ArServerBasemyServer
std::string myServerKey
int myServerPort
bool myTcpOnly
const char * myUserFile


Member Function Documentation

int ArServerSimpleOpener::getPort (  )  [inline]

Get the server's port number

Returns:
the server's port number


The documentation for this class was generated from the following file:
Generated on Thu Aug 6 09:40:12 2009 for ArNetworking by  doxygen 1.5.1