示例#1
0
文件: Client.cs 项目: tstorcz/LevelUp
 private void PackageManage_ForwardRequestReceived(object sender, PackageEventArgs e)
 {
     ForwardRequest(this, e);
 }
示例#2
0
文件: Client.cs 项目: tstorcz/LevelUp
        private void PackageManage_LoginRequestReceived(object sender, PackageEventArgs e)
        {
            LoginReqPackage lrp = (LoginReqPackage)e.Package;

            Id = lrp.DeviceId;

            byte[] loginRespBytes = new LoginRespPackage().GetBytes();

            Send(loginRespBytes);
            DataSent(this, new SocketCommunicationEventArgs(loginRespBytes));
        }
示例#3
0
文件: Client.cs 项目: tstorcz/LevelUp
        private void PackageManage_CallRequestReceived(object sender, PackageEventArgs e)
        {
            Random rnd = new Random();
            byte[] callRespBytes = new CallRespPackage(true, rnd.Next()).GetBytes();

            Send(callRespBytes);
            DataSent(this, new SocketCommunicationEventArgs(callRespBytes));
        }
示例#4
0
文件: Client.cs 项目: tstorcz/LevelUp
        private void PackageManage_PingReceived(object sender, PackageEventArgs e)
        {
            byte[] pongBytes = new PongPackage().GetBytes();

            Send(pongBytes);
            DataSent(this, new SocketCommunicationEventArgs(pongBytes));
        }