예제 #1
0
        public static void Main(string[] argv)
        {
            Filter3 srv = MqFactoryS <Filter3> .Add().New();

            try {
                srv.LinkCreate(argv);
                srv.ProcessEvent(MqS.WAIT.FOREVER);
            } catch (Exception ex) {
                srv.ErrorSet(ex);
            }
            srv.Exit();
        }
예제 #2
0
        static void Main(string[] argv)
        {
            testserver srv = MqFactoryS <testserver> .New();

            try {
                srv.LinkCreate(argv);
                srv.ProcessEvent(MqS.WAIT.FOREVER);
            } catch (Exception ex) {
                srv.ErrorSet(ex);
            }
            srv.Exit();
        }
예제 #3
0
        public static void Main(string[] argv)
        {
            Filter6 srv = MqFactoryS <Filter6> .Add("transFilter").New();

            try {
                srv.ConfigSetIgnoreExit(true);
                srv.LinkCreate(argv);
                srv.ProcessEvent(MqS.WAIT.FOREVER);
            } catch (Exception ex) {
                srv.ErrorSet(ex);
            }
            srv.Exit();
        }
예제 #4
0
        // ########################################################################

        static void Main(string[] args)
        {
            Server srv = MqFactoryS <Server> .Add("server").New();

            try {
                srv.LinkCreate(args);
                srv.LogC("test", 1, "this is the log test\n");
                srv.ProcessEvent(MqS.WAIT.FOREVER);
            } catch (Exception ex) {
                srv.ErrorSet(ex);
            } finally {
                srv.Exit();
            }
        }
예제 #5
0
        public static void Main(string[] argv)
        {
            Filter1 srv = MqFactoryS <Filter1> .New("filter");

            try {
                srv.LinkCreate(argv);
                srv.ServiceCreate("+FTR", srv.FTR);
                srv.ServiceCreate("+EOF", srv.EOF);
                srv.ProcessEvent(MqS.WAIT.FOREVER);
            } catch (Exception ex) {
                srv.ErrorSet(ex);
            }
            srv.Exit();
        }
예제 #6
0
        public static void Main(string[] argv)
        {
            MqFactoryS <Filter4> .Default("transFilter");

            Filter4 srv = new Filter4(null);

            try {
                srv.ConfigSetIgnoreExit(true);
                srv.LinkCreate(argv);
                srv.ProcessEvent(MqS.WAIT.FOREVER);
            } catch (Exception ex) {
                srv.ErrorSet(ex);
            }
            srv.Exit();
        }
예제 #7
0
        static void Main(string[] argv)
        {
            manfilter srv = MqFactoryS <manfilter> .New("ManFilter");

            try {
                srv.ConfigSetIsServer(true);
                srv.LinkCreate(argv);
                srv.ServiceCreate("+FTR", srv.FTR);
                srv.ServiceProxy("+EOF");
                srv.ProcessEvent(MqS.WAIT.FOREVER);
            } catch (Exception ex) {
                srv.ErrorSet(ex);
            }
            srv.Exit();
        }
예제 #8
0
        public static void Main(string[] argv)
        {
            MqFactoryS <F1> .Add();

            MqFactoryS <F2> .Add();

            MqFactoryS <F3> .Add();

            MqS srv = MqFactoryS <MqS> .Call(argv[0]);

            try {
                srv.LinkCreate(argv);
                srv.ProcessEvent(MqS.WAIT.FOREVER);
            } catch (Exception ex) {
                srv.ErrorSet(ex);
            }
            srv.Exit();
        }
예제 #9
0
        private void CFG1()
        {
            String cmd = ReadC();

            SendSTART();

            if (cmd == "Buffersize")
            {
                int old = ConfigGetBuffersize();
                ConfigSetBuffersize(ReadI());
                SendI(ConfigGetBuffersize());
                ConfigSetBuffersize(old);
            }
            else if (cmd == "Debug")
            {
                int old = ConfigGetDebug();
                ConfigSetDebug(ReadI());
                SendI(ConfigGetDebug());
                ConfigSetDebug(old);
            }
            else if (cmd == "Timeout")
            {
                long old = ConfigGetTimeout();
                ConfigSetTimeout(ReadW());
                SendW(ConfigGetTimeout());
                ConfigSetTimeout(old);
            }
            else if (cmd == "Name")
            {
                string old = ConfigGetName();
                ConfigSetName(ReadC());
                SendC(ConfigGetName());
                ConfigSetName(old);
            }
            else if (cmd == "SrvName")
            {
                string old = ConfigGetSrvName();
                ConfigSetSrvName(ReadC());
                SendC(ConfigGetSrvName());
                ConfigSetSrvName(old);
            }
            else if (cmd == "Storage")
            {
                string old = ConfigGetStorage();
                ConfigSetStorage(ReadC());
                SendC(ConfigGetStorage());
                ConfigSetStorage(old);
            }
            else if (cmd == "Ident")
            {
                string old = FactoryCtxIdentGet();
                FactoryCtxSet(MqFactoryS <Server> .Get().Copy(ReadC()).factory);
                bool check = LinkGetTargetIdent() == ReadC();
                SendSTART();
                SendC(FactoryCtxIdentGet());
                SendO(check);
                FactoryCtxIdentSet(old);
            }
            else if (cmd == "IsSilent")
            {
                bool old = ConfigGetIsSilent();
                ConfigSetIsSilent(ReadO());
                SendO(ConfigGetIsSilent());
                ConfigSetIsSilent(old);
            }
            else if (cmd == "IsString")
            {
                bool old = ConfigGetIsString();
                ConfigSetIsString(ReadO());
                SendO(ConfigGetIsString());
                ConfigSetIsString(old);
            }
            else if (cmd == "IoUds")
            {
                string old = ConfigGetIoUdsFile();
                ConfigSetIoUdsFile(ReadC());
                SendC(ConfigGetIoUdsFile());
                ConfigSetIoUdsFile(old);
            }
            else if (cmd == "IoTcp")
            {
                string h, p, mh, mp;
                string hv, pv, mhv, mpv;
                h   = ConfigGetIoTcpHost();
                p   = ConfigGetIoTcpPort();
                mh  = ConfigGetIoTcpMyHost();
                mp  = ConfigGetIoTcpMyPort();
                hv  = ReadC();
                pv  = ReadC();
                mhv = ReadC();
                mpv = ReadC();
                ConfigSetIoTcp(hv, pv, mhv, mpv);
                SendC(ConfigGetIoTcpHost());
                SendC(ConfigGetIoTcpPort());
                SendC(ConfigGetIoTcpMyHost());
                SendC(ConfigGetIoTcpMyPort());
                ConfigSetIoTcp(h, p, mh, mp);
            }
            else if (cmd == "IoPipe")
            {
                int old = ConfigGetIoPipeSocket();
                ConfigSetIoPipeSocket(ReadI());
                SendI(ConfigGetIoPipeSocket());
                ConfigSetIoPipeSocket(old);
            }
            else if (cmd == "StartAs")
            {
                START old = ConfigGetStartAs();
                ConfigSetStartAs((START)ReadI());
                SendI((int)ConfigGetStartAs());
                ConfigSetStartAs(old);
            }
            else if (cmd == "DefaultIdent")
            {
                SendC(MqFactoryS <Server> .DefaultIdent());
            }
            else
            {
                ErrorC("CFG1", 1, "invalid command: " + cmd);
            }
            SendRETURN();
        }