/// <summary> /// Fires when a packet containing an identity is received, the args contain the id /// </summary> private void OnIdentityReceived(object owner, DtmIdentityArgs args) { //MZ@20190707 if (args.Message == DtmExchangeFlags.Auth) // || args.Message == DtmExchangeFlags.Sync) { var authorizedClient = _myIdentity.VerifyTestIdentityPacket(args.DtmID.Identity, "DMTServerTEST001"); if (!authorizedClient) { // TODO: Handle better! throw new Exception("Unauthorized server!"); } } Console.WriteLine(CON_TITLE + String.Format("Client received an identity packet: {0}", IdToString(args.DtmID.Identity))); }
/// <summary> /// Fires when a packet containing an identity is received, the args contain the id /// </summary> private void OnIdentityReceived(object owner, DtmIdentityArgs args) { Console.WriteLine(CON_TITLE + String.Format("Server received an identity packet: {0}", IdToString(args.DtmID.Identity))); }