@Override
	public byte[] receiveData(NetworkConnection targetConn, int targetDataSize) 
	{
		byte[] toRet = null;
		TCPNetworkConnection conn = (TCPNetworkConnection)targetConn;
		if(conn != null && conn.currentServSocket !=null)
		{
			try
			{
				toRet = new byte[targetDataSize];
				if(conn.currrentConnSocket.getInputStream().read(toRet, 0, targetDataSize) != targetDataSize)
				{
					toRet = null;
				}
			}
			catch(Exception e)
			{
				toRet = null;
				Logger.logException("Problem occured while trying to receive data", e);
			}
		}
		return toRet;
	}