// 设定time out时间
struct timeval network_timeout;
network_timeout.tv_usec = 0;
network_timeout.tv_sec = 10;
// 设定time out时间
result = ldap_set_option(*ld, LDAP_OPT_NETWORK_TIMEOUT, &network_timeout);
阅读全文>
发表于 @ 2006年11月24日 13:21:00|评论(loading...)|收藏
示例代码:
// データベースにエントリーを検索する
result = ldap_search_ext_s(ld, base.c_str(), LDAP_SCOPE_SUBTREE, str_filter.c_str(), attrs, 0,
NULL, NULL, TIME_OUT, sizeLimite, &msg);
// 変数をクリアする
delete[] attrs;
if (result != LDAP_SUCCESS)
{
// 検索が失敗した場合、CISNSException異常をスローする
DEBUG_1(g_debug_flag, ldap_search_ext_s():failed[%s], ldap_err2string(result));
// 検索対象が存在しない場合、エラーとしない
阅读全文>
发表于 @ 2006年11月14日 10:32:00|评论(loading...)|收藏
一、系统环境:
二、Red Hat Enterprise Linux4.0下CppUnit1.12.0的安装
三、实例阅读全文>
发表于 @ 2006年10月19日 18:07:00|评论(loading...)|收藏