private boolean sendBeacon(Connection connection){
			
		BeaconPacket beacon = new BeaconPacket(agent);
	
		byte[] packet = beacon.toParcel().toByteArray();
		
		if(packet != null){
			
			//Send the beacon packet.
			boolean success = connection.send(packet, 
								              agent.getPortConfiguration().getBeaconServicePort(), 
								              Connection.BROADCAST_ADDRESS);
			
			//If the agent has a stat monitor and the packet was successfully 
			//sent, notify the stat monitor.
			if(agent.getStatMonitor() != null && success){
				agent.getStatMonitor().packetSent(new StatPacket(beacon));
				
				Logger.debug("SENT BEACON PACKET.");
			}

			return success;
		}
			
		return false;
	}