@Override
	public void run()
	{
		try
		{
			LinkedList<InetAddress> broadcastIps;
			if(System.getProperty("os.name").startsWith("Windows"))
			{//we have a windows here....
				broadcastIps = getBroadcastWindows();
			}else
			{
				//do normal stuff
				broadcastIps =  new LinkedList<InetAddress>();
					Enumeration<NetworkInterface> infs = NetworkInterface
							.getNetworkInterfaces();
					while (infs.hasMoreElements())
					{
						NetworkInterface networkInterface = infs.nextElement();
						List<InterfaceAddress> infsadd = networkInterface
								.getInterfaceAddresses();
						for (InterfaceAddress add : infsadd)
						{
							if (add.getBroadcast() != null)
								broadcastIps.add(add.getBroadcast());
						}

					}
			}
			
			

			// send multicast
			InetAddress group = InetAddress
					.getByName(NETCONSTANTS.MULITCASTGROUP);
			DatagramPacket packet = new DatagramPacket(new byte[0], 0, group,
					NETCONSTANTS.BROADCAST_PORT);
			this.socket.send(packet);
			
			//workaround for loopbackdevice
			broadcastIps.add(InetAddress.getByName("127.0.0.1"));

			// send broadcasts s s s s
			while (!broadcastIps.isEmpty())
			{
				packet.setAddress(broadcastIps.pop());
				packet.setPort(NETCONSTANTS.BROADCAST_PORT);
				this.socket.send(packet);
			}

			this.startTime = System.currentTimeMillis();
			while (!this.isInterrupted())
			{
				// waiting for reply
				DatagramPacket reply = new DatagramPacket(
						new byte[NETCONSTANTS.BROADCAST_PACKET_LENGTH],
						NETCONSTANTS.BROADCAST_PACKET_LENGTH);
				try
				{
					this.socket.receive(reply);
					ByteBuffer buf = ByteBuffer.wrap(reply.getData());
					int currentPlayer = buf.getInt();
					int maxPlayer = buf.getInt();
					int port = buf.getInt();
					long id = buf.getLong();
					byte[] arr = new byte[buf.get()];
					buf.get(arr);
					String infoMsg = new String(arr);
					int ping = (int) (System.currentTimeMillis() - startTime);

					ServerInfo info = new ServerInfo(infoMsg, currentPlayer,
							maxPlayer, ping, port, reply.getAddress(), id);
					lis.serverResponce(info);

				} catch (SocketTimeoutException e)
				{

					break;
				}

			}
		} catch (IOException e)
		{
			e.printStackTrace();
		}
	}