Example #1
0
        public async Task NotifyBind(PitayaSession pitayaSession, RPCMsg msg)
        {
            var response = new MyResponse
            {
                Msg  = $"hello from csharp handler!!! :) {Guid.NewGuid().ToString()}",
                Code = 200
            };

            await pitayaSession.Bind("uidbla");

            Console.WriteLine("handler executed with arg {0}", msg);
            Console.WriteLine("handler executed with session ipversion {0}", pitayaSession.GetString("ipversion"));
        }
Example #2
0
        public async Task <MyResponse> Entry(PitayaSession session, RPCMsg msg)
        {
            try
            {
                await session.Bind("CSHARP_UID");
            }
            catch (Exception e)
            {
                Console.WriteLine($"session bind error: {e.Message}");
            }

            var response = new MyResponse
            {
                Msg  = $"WUJOQWIEJOIQWJEOIQWJEOIQJWEOIJQWIOJE",
                Code = 200
            };

            return(response);
        }