Example #1
0
        static async void Send()
        {
            await tmp.Set <int>(1);

            await tmp.Set <string>("2");

            await tmp.Set <float>(3.0f);

            await tmp.Set <double>(4.0f);

            string a = await tmp.Read <string>();

            Console.WriteLine(a);

            await tmp.Back <string>();

            await tmp.Set <int>(5);

            await tmp.Set <string>("6");

            await tmp.Set <float>(7.0f);

            await tmp.Set <double>(8.0f);

            a = await tmp.Read <string>();

            Console.WriteLine(a);
            await tmp.Back <string>();
        }
Example #2
0
        public async Task <string> GetArgs()
        {
            string a = await fiber.Read <string>();

            await fiber.Back <string>();

            return(a);
        }
Example #3
0
        public async Task <string> DownHtml(Fiber fiber, string url)
        {
            await fiber.Set <string>(url);

            string htm = await fiber.Read <string>();

            await fiber.Back <string>();

            return(htm);
        }
Example #4
0
        public static async void Run0()
        {
            fiber.SetAction(async() =>
            {
                // string res = await Run1();
                string a = await GetString2();
                Console.WriteLine(a);
            });

            fiber.Start();

            if (!fiber.IsOver)
            {
                string data = await fiber.Read <string>();

                data += " OK";

                await fiber.Back <string>();

                datax = data;
            }
        }