2 * Copyright (c) 2007-2008 Fabrizio Frioli, Michele Pedrolli
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License version 2 as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 * Please send your questions/suggestions to:
20 * {fabrizio.frioli, michele.pedrolli} at studenti dot unitn dot it
24 package example.bittorrent;
26 import peersim.core.*;
27 import psgsim.Sizable;
30 * This class is a {@link SimpleMsg} and acts as a container for a message that
31 * uses only an integer value.
33 public class IntMsg extends SimpleMsg implements Sizable {
36 * The data value (an integer) contained in the message.
42 * The basic constructor of the message.
45 * the type of the message
49 * The data value of the message
51 public IntMsg(int type, Node sender, int value, double size) {
53 super.sender = sender;
59 * Gets the value contained in the message.
61 * @return the integer value contained in the message
68 public double getSize() {
69 // TODO Auto-generated method stub