コード例 #1
0
ファイル: asynchandler.cs プロジェクト: udaparts/socketpro
 protected CAsyncServiceHandler(uint nServiceId)
 {
     m_nServiceId   = nServiceId;
     m_ClientSocket = null;
     m_lstBRP       = new UDelegate <DOnBaseRequestProcessed>(m_cs);
     m_lstEFS       = new UDelegate <DOnExceptionFromServer>(m_cs);
     m_lstRR        = new UDelegate <DOnResultReturned>(m_cs);
     m_ar           = new CAsyncResult(this, 0, null, null);
 }
コード例 #2
0
            private void ProcessODBC(DExecuteResult handler, CAsyncResult ar, ushort reqId, ulong index)
            {
                ulong  fail_ok;
                int    res;
                string errMsg;

                ar.Load(out res).Load(out errMsg).Load(out fail_ok);
                COdbc odbc = (COdbc)ar.AsyncServiceHandler;

                lock (odbc.m_csDB) {
                    odbc.m_lastReqId = reqId;
                    odbc.m_affected  = 0;
                    odbc.m_dbErrCode = res;
                    odbc.m_dbErrMsg  = errMsg;
                    odbc.m_mapRowset.Remove(index);
                }
                if (handler != null)
                {
                    handler(odbc, res, errMsg, 0, fail_ok, null);
                }
            }