This method first checks to see if there is a dbmlsync server listening on the specified port. If a server is present, the method returns without further action. If no server is found, the method starts a new server using the options specified by the cmdline argument and waits for it to start accepting requests before returning.
bool StartServer( unsigned port, const char *cmdline, unsigned timeout, DBSC_Starttype *starttype );
port The TCP port to check for an existing dbmlsync server. If a new server is started, it is set to listen on this port.
cmdline A valid command line for starting a dbmlsync server. The command line may contain only the following options which have the same meaning that they do for the dbmlsync utility:
The -c option must be specified.
timeout The maximum time in milliseconds to wait after a dbmlsync server is started for it to be ready to accept requests. Use DBSC_INFINITY to wait forever.
starttype This is an ‘out’ parameter. If starttype is non-null on entry and StartServer returns true, then on exit the variable pointed to by starttype is set to one of the following values:
DBSC_SS_STARTED Indicates that a new synchronization server was started.
DBSC_SS_ALREADY_RUNNING Indicates that an existing synchronization server was found, so no new server was started.
Returns true if the server was already running or was successfully started.
Returns false if the server was not successfully started or the server did not begin processing requests before the timeout expired. When false is returned, you can call the GetErrorInfo method to get more information about the failure. See GetErrorInfo method.
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |