private void PackageManage_ForwardRequestReceived(object sender, PackageEventArgs e) { ForwardRequest(this, e); }
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)); }
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)); }
private void PackageManage_PingReceived(object sender, PackageEventArgs e) { byte[] pongBytes = new PongPackage().GetBytes(); Send(pongBytes); DataSent(this, new SocketCommunicationEventArgs(pongBytes)); }