public void run () {
				while (true) {
					Socket s = null;
					boolean connected = false;
						try {
						s = new Socket(Unity.ip, Integer.parseInt(Unity.port));
						connected = true;
					} catch (Exception e) {
					} finally {
						if (s != null) {
							try {
								s.close();
							} catch(IOException e1) {
								
							}
						}
					}
					if (connected) {
							System.out.println("Connection to server established.");
							server_stat_lbl.setText("Online");
							server_stat_lbl.setForeground(Color.GREEN);
					} else {
							System.out.println("Unable to establish connection.");
							server_stat_lbl.setText("Offline");
							server_stat_lbl.setForeground(Color.RED);
					}
					try { Thread.sleep(5000);
					} catch (Exception e) {};
				}
				
			}