@Override
	public synchronized void receive(MulticastReceiveEvent event) {
		
		// Parse incoming data
		SLCP receiver = new SLCP(SLCP.VERSION_V1);
		try {
			final AbstractChatResponse resp = receiver.parse(event.getData());
			
			if(resp instanceof ChatMessage) {
				// Add entry to the model to display it on the panechatbox.
				// Before, parse all sileys and replace ascii with html img tags.
				ChatMessage chatMessage = (ChatMessage)resp;
				chatMessage.getChatMessage().setMessage(SmileyUtil.parseSmileysInString(chatMessage.getChatMessage().getMessage()));
				model.addEntry(chatMessage);
				// change trayicon (when application is minimized)
				view.getTray().setIncomingTrayIcon();
				
				if(!view.getMainframe().isActive())
					view.getMainframe().setIncomingAppIcon();
				
				
				// when muted, hide tray messages
				if(!model.isMute()) {
					view.getTray().showTrayMessageDialog("incoming message", model.getLastEntry().getChatMessage().getMessage());
					playSound(getClass().getResource(PropertiesUtil.getLanchatPropertyString("SOUND_INCOMING")));
				}
			}
			
			if(resp instanceof ChatPing) {
				model.addUserListEntry(resp.getID(),resp.getChatName());
				model.setPingChange(true);
			}
			
			
		} catch(ParseException ex) {
			JLoggerUtil.getLogger().warn("ParseException in receive. Invalid input detected, continue receiving.");
			
		} catch (IllegalAccessException e) {
			JLoggerUtil.getLogger().warn("IllegalAccessException in receive. Tray not supported.");
			
		} catch (NullPointerException ex) {
			JLoggerUtil.getLogger().warn("NullPointerException in receive. Empty message detected, continue receiving.");
		}
			
		
	}