blob: d0a67882e1e27d3401d4cdc8bae526c73e129354 [file] [log] [blame]
Alexander Afanasyevdfe58192013-01-17 17:34:04 -08001/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
2/*
3 * Copyright (c) 2012 University of California, Los Angeles
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
19 * Zhenkai Zhu <zhenkai@cs.ucla.edu>
20 */
21
22#include "fetcher.h"
23#include <boost/make_shared.hpp>
24#include <boost/ref.hpp>
25#include <boost/throw_exception.hpp>
26
27using namespace boost;
28using namespace std;
Alexander Afanasyevdfe58192013-01-17 17:34:04 -080029
Alexander Afanasyev49a18522013-01-18 17:49:04 -080030Fetcher::Fetcher (Ccnx::CcnxWrapperPtr ccnx, SchedulerPtr scheduler,
31 const Ccnx::Name &name, int32_t minSeqNo, int32_t maxSeqNo,
32 const Ccnx::Name &forwardingHint/* = Ccnx::Name ()*/)
33 : m_ccnx (ccnx)
34 , m_scheduler (scheduler)
35 , m_name (name)
36 , m_forwardingHint (forwardingHint)
37 , m_minSendSeqNo (-1)
38 , m_maxSendSeqNo (-1)
39 , m_minSeqNo (minSeqNo)
40 , m_maxSeqNo (maxSeqNo)
Alexander Afanasyevdfe58192013-01-17 17:34:04 -080041
Alexander Afanasyev49a18522013-01-18 17:49:04 -080042 , m_pipeline (6) // initial "congestion window"
Alexander Afanasyevdfe58192013-01-17 17:34:04 -080043{
Alexander Afanasyevdfe58192013-01-17 17:34:04 -080044}
45
46Fetcher::~Fetcher ()
47{
Alexander Afanasyevdfe58192013-01-17 17:34:04 -080048}