ArNetworking: ArServerSimpleOpener Class Reference

- Main Page
- Classes
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# 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< ArServerSimpleOpener > | myLogOptionsCB
bool | myLogUserInfo
bool | myOpenFailed
const char * | myOpenOnIP
bool | myOwnParser
ArRetFunctorC< bool, ArServerSimpleOpener > | myParseArgsCB
ArArgumentParser * | myParser
std::string | myPrefix
ArServerBase * | myServer
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:

- ArServerSimpleOpener.h