예제 #1
0
        private void IFindNode()
        {
            pnCli2Vault_NodeFind req = new pnCli2Vault_NodeFind();
            req.Read(fStream);

            pnVault2Cli_NodeFindReply reply = new pnVault2Cli_NodeFindReply();
            reply.fTransID = req.fTransID;
            try {
                reply.fNodeIDs = IFindNode(req.fPattern);
                reply.fResult = ENetError.kNetSuccess;
            } catch (pnDbException e) {
                reply.fResult = ENetError.kNetErrInternalError;
                Error(e, "VaultNodeFind failed");
            }

            reply.Send(fStream);
        }
예제 #2
0
        public void FindNode(pnVaultNode pattern, pnCallback cb = null)
        {
            pnCli2Vault_NodeFind req = new pnCli2Vault_NodeFind();
            req.fPattern = pattern;
            req.fTransID = GetTransID();

            lock (fStream) {
                if (cb != null)
                    fCallbacks.Add(req.fTransID, cb);
                req.Send(fStream);
            }
        }