X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d0ffc37686edcc803601f76ab51fdfed5fc2f241..089f75c8f83b841c91e74cdfd4e925d027ff7769:/examples/msg/bittorrent/connection.h diff --git a/examples/msg/bittorrent/connection.h b/examples/msg/bittorrent/connection.h index 2d3000891f..057e3d8cbe 100644 --- a/examples/msg/bittorrent/connection.h +++ b/examples/msg/bittorrent/connection.h @@ -1,13 +1,13 @@ -/* Copyright (c) 2012-2013. The SimGrid Team. +/* Copyright (c) 2012-2014, 2016. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ + #ifndef BITTORRENT_CONNECTION_H_ #define BITTORRENT_CONNECTION_H_ -/** - * Contains the connection data of a peer. - */ + +/** Contains the connection data of a peer. */ typedef struct s_connection { int id; //Peer id char *bitfield; //Fields @@ -21,19 +21,16 @@ typedef struct s_connection { int choked_upload:1; //Indicates if the peer is choked for the current peer int choked_download:1; //Indicates if the peer has choked the current peer } s_connection_t, *connection_t; -/** - * Build a new connection object from the peer id. - * @param id id of the peer + +/** @brief Build a new connection object from the peer id. + * @param id id of the peer */ connection_t connection_new(int id); -/** - * Add a new value to the peer speed average - * @param connection connection data - * @param speed speed to add to the speed average +/** @brief Add a new value to the peer speed average + * @param connection connection data + * @param speed speed to add to the speed average */ void connection_add_speed_value(connection_t connection, double speed); -/** - * Frees a connection object - */ +/** Frees a connection object */ void connection_free(void *data); #endif /* BITTORRENT_CONNECTION_H_ */