78 lines
3.7 KiB
HTML
78 lines
3.7 KiB
HTML
<!--"@(#)env_set_server.so 10.13 (Sleepycat) 8/25/99"-->
|
|
<!--Copyright 1997, 1998, 1999, 2000 by Sleepycat Software, Inc.-->
|
|
<!--All rights reserved.-->
|
|
<html>
|
|
<head>
|
|
<title>Berkeley DB: DBENV->set_server</title>
|
|
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
|
|
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
|
|
</head>
|
|
<body bgcolor=white>
|
|
<a name="2"><!--meow--></a>
|
|
<table><tr valign=top>
|
|
<td>
|
|
<h1>DBENV->set_server</h1>
|
|
</td>
|
|
<td width="1%">
|
|
<a href="../api_c/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
|
|
</td></tr></table>
|
|
<hr size=1 noshade>
|
|
<tt>
|
|
<h3><pre>
|
|
#include <db.h>
|
|
<p>
|
|
int
|
|
DBENV->set_server(DB_ENV *dbenv, char *host,
|
|
long cl_timeout, long sv_timeout, u_int32_t flags);
|
|
</pre></h3>
|
|
<h1>Description</h1>
|
|
<p>Connects to the DB server on the indicated hostname and sets up a channel
|
|
for communication.
|
|
<p>The <b>cl_timeout</b> argument specifies the number of seconds the client
|
|
should wait for results to come back from the server. Once the timeout
|
|
has expired on any communication with the server, DB_NOSERVER will
|
|
be returned. If this value is zero, a default timeout is used.
|
|
<p>The <b>sv_timeout</b> argument specifies the number of seconds the server
|
|
should allow a client connection to remain idle before assuming that
|
|
client is gone. Once that timeout has been reached, the server releases
|
|
all resources associated with that client connection. Subsequent attempts
|
|
by that client to communicate with the server result in
|
|
DB_NOSERVER_ID indicating that an invalid identifier has been
|
|
given to the server. This value can be considered a hint to the server.
|
|
The server may alter this value based on its own policies or allowed
|
|
values. If this value is zero, a default timeout is used.
|
|
<p>The <b>flags</b> parameter is currently unused, and must be set to 0.
|
|
<p>When the DBENV->set_server function has been called, any subsequent calls
|
|
to Berkeley DB library interfaces may return either <a name="DB_NOSERVER">DB_NOSERVER</a> or
|
|
<a name="DB_NOSERVER_ID">DB_NOSERVER_ID</a>.
|
|
<p>The DBENV->set_server function returns a non-zero error value on failure and 0 on success.
|
|
<h3>Errors</h3>
|
|
<p><dl compact>
|
|
<p><dt>EINVAL<dd>An invalid flag value or parameter was specified.
|
|
<p>dbenv_set_server
|
|
</dl>
|
|
<h1>See Also</h1>
|
|
<a href="../api_c/env_close.html">DBENV->close</a>,
|
|
<a href="../api_c/env_create.html">db_env_create</a>,
|
|
<a href="../api_c/env_open.html">DBENV->open</a>,
|
|
<a href="../api_c/env_remove.html">DBENV->remove</a>,
|
|
<a href="../api_c/db_err.html">DBENV->err</a>,
|
|
<a href="../api_c/env_strerror.html">db_strerror</a>,
|
|
<a href="../api_c/env_version.html">db_version</a>,
|
|
<a href="../api_c/env_set_cachesize.html">DBENV->set_cachesize</a>,
|
|
<a href="../api_c/env_set_errcall.html">DBENV->set_errcall</a>,
|
|
<a href="../api_c/env_set_errfile.html">DBENV->set_errfile</a>,
|
|
<a href="../api_c/env_set_errpfx.html">DBENV->set_errpfx</a>,
|
|
<a href="../api_c/env_set_flags.html">DBENV->set_flags</a>,
|
|
<a href="../api_c/env_set_mutexlocks.html">DBENV->set_mutexlocks</a>,
|
|
<a href="../api_c/env_set_paniccall.html">DBENV->set_paniccall</a>,
|
|
and
|
|
<a href="../api_c/env_set_verbose.html">DBENV->set_verbose</a>.
|
|
</tt>
|
|
<table><tr><td><br></td><td width="1%">
|
|
<a href="../api_c/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
|
|
</td></tr></table>
|
|
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
|
|
</body>
|
|
</html>
|