// defines class shore_vas: #include <shore_vas.h> shore_vas *new_svas( shore_vas **result = NULL, const char *host = NULL, int kbytes_shm_small = -1, int kbytes_shm_large = -1 ); bool shore_svas::connected() const;
The client library method connected returns true if a connection is established with the server. The server library method attaches the client's transaction to the thread that called the method, if the client is running a transaction. It returns trueifthereisaclientattachedtothisthread(which is almost always the case).
The SVAS opens a TCP connection with the server, authenticates the client process to the server, and request that the server allocate shared memory for message-passing according the the values of kbytes_shm_small and kbytes_shm_large. Kbytes_shm_small indicates how many kilobytes of shared memory to allocate for the transfer of small-object pages (groups of small anonymous objects) between the server and the client. Kbytes_shm_large indicates how many kilobytes of shared memory to allocate for the transfer of large-object pages (parts of large objects) between the server and the client. If no value is given for either of these arguments, their values are taken from the options svas_shm_small_obj and svas_shm_large_obj, respectively.
If the server does not reside on the same machine as the client (application process), shared memory is not used. In this case, all data flow across the TCP connection.
If an error is encountered in any of these steps, and result is non-null, *result will be a null pointer on return from the function.
The environment variable SHORE_RC, if set, must be the name of a configuration file containing values for the options. If it is not set, the client library uses the name .svas_rc. The library searches $HOME, then the working directory for a file with that name. If such a file is found, it is read and its commands are interpreted. See options(svas) for more information about options.
Should an error occur during the function new_svas, information will be logged to the error log for the client. The error log is determined by the value of the option svas_log. (The default is to log to the standard error file.) See options(svas) for more information about options.
A complete list of errors is in errors(svas).