public void server()
	{
		
						try
						{
							
						String rr="";
						socket_1=server_1.accept();	
						dis=new DataInputStream(socket_1.getInputStream());
						int length=dis.readInt();
						String destination=dis.readUTF();
						if(destination.equalsIgnoreCase("R-101"))
							{
								jTextArea1.append("\t**********************************\n");
								jTextArea1.append("\tTHIS IS FROM PORT I_101\n");
								jTextArea1.append("\t**********************************\n");
								client_1=new Socket("localhost",101);
								dis1=new DataOutputStream(client_1.getOutputStream());
								dis1.writeInt(length);
								dis1.writeUTF(destination);
						
						while(length>0)
							{
								
								rr=dis.readUTF();
								jTextArea1.append("Packet "+i+"\t"+rr+" Recieved...\n");
								dis1=new DataOutputStream(client_1.getOutputStream());
								dis1.writeUTF(rr);
								length--;
								i++;
							}
							i=1;
								
							}
							else if (destination.equalsIgnoreCase("I-102"))
						{
							
							jTextArea1.append("\t**********************************\n");
							jTextArea1.append("\tTHIS IS FROM PORT I_102\n");
							jTextArea1.append("\t**********************************\n");
							while(length>0)
							{
									
								rr=dis.readUTF();
								StringBuffer sb=new StringBuffer(rr);
								sb.delete(7,10);
								jTextArea1.append("\t\tPacket "+i+"\t"+rr.substring(4,15)+" Recieved...\n");
								length--;
								i++;
							
								
							}
							i=1;
							int delay = 100; //milliseconds
								Timer t=new Timer(delay, new ActionListener() {
									int count=1;
									public void actionPerformed(ActionEvent evt) {
									if(count<=10)
									{
									java.awt.Toolkit.getDefaultToolkit().beep();
									count++;
									}	
									else
								  return;
								}
								});
								 
								t.start();


							
							JOptionPane.showMessageDialog(null,"This Is From Intruder Port");
							JOptionPane.showMessageDialog(null,"The Intruder Has Been Detected");
							JOptionPane.showMessageDialog(null,"This Is Detected By Detector1!!!!!!");
								
						}
						else if (destination.equalsIgnoreCase("R-107"))
						{
								jTextArea1.append("\t**********************************\n");
								jTextArea1.append("\tTHIS IS FROM PORT I_107\n");
								jTextArea1.append("\t**********************************\n");
								client_1=new Socket("localhost",101);
								dis1=new DataOutputStream(client_1.getOutputStream());
								dis1.writeInt(length);
								dis1.writeUTF(destination);
						while(length>0)
							{
									
								rr=dis.readUTF();
								jTextArea1.append("Packet "+i+"\t"+rr+" Recieved...\n");
								dis1=new DataOutputStream(client_1.getOutputStream());
								dis1.writeUTF(rr);
								length--;
								i++;
							}

							i=1;
								
						}
						
						
						
						
						}
						catch (Exception exp)
						{
							exp.printStackTrace();
						}
						
					
					
	
	}