예제 #1
0
		}//end Deq
		public bool Enq(Packet packetX) { //debug performance make this a reference???
			bool bGood=false;
			try {
				//if (userarr[packetX.iTokenNum].sTo == packetX.sFrom) {
				if (accountant.NameOfNum(packetX.iTokenNum) == packetX.sFrom) {
					packetqIn.Enq(packetX); //packet will be processed later by Packeting
					bGood=true;
				}
				else {
					RReporting.ShowErr("security notice: name at token #"+packetX.iTokenNum.ToString()+" was "+accountant.NameOfNum(packetX.iTokenNum)+" not "+packetX.sFrom);
				}
			}
			catch (Exception exn) {
				RReporting.ShowExn(exn,"Packeter Enq","checking matching name at token #"+packetX.iTokenNum.ToString()+" for authenticating a user packet" );
			}
			return bGood;
		}