...
int on=1;
setsockopt(m_nLsnSocketHandle, IPPROTO_TCP, TCP_NODELAYACK, &on, sizeof(on));
otl_stream o;
try{
o.open(1, // buffer size should be equal to 1 in case of stored procedure call
"begin PROC_CERT_VALIDATION(:V_DN<char[4000],in>,:V_CERTSTAT<char[33],out> ); end;",
dbconn// connect object
);
o.set_commit(0);
o<<pszDN;
char pszStat[32];
o>>pszStat;
if (memcmp(pszStat,"GOOD",4)==0) nResult=0;
else nResult = -1;
o.close();
return 0;
}
catch( otl_exception &p )
{
///< intercept OTL exceptions
printf("%s",p.msg);
}
// failed
o.close();
void ReplaceAll (string& strSrc, const string& strFind, const string& strDest)
{
size_t j;
while ((j = strSrc.find(strFind)) != string::npos)
strSrc.replace(j, strFind.length(), strDest);
}
사용법 : ReplaceAll(strtimebuf,"/","");
strtimebuf <- 원본문자열 ReplaceAll을 수행하고나면 원본문자열변수가 변경된다.