From: mquinson Date: Wed, 9 May 2007 09:38:59 +0000 (+0000) Subject: Some more documentation to help BSD experts such as Bruno ;) X-Git-Tag: v3.3~1867 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/355d3a92c765a83ef3360bcbfd6e796493fe7cf9 Some more documentation to help BSD experts such as Bruno ;) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3493 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/include/gras/transport.h b/include/gras/transport.h index 4282a8a02e..40622fdcdf 100644 --- a/include/gras/transport.h +++ b/include/gras/transport.h @@ -59,13 +59,26 @@ gras_socket_server_range(unsigned short minport, unsigned short maxport, /** \defgroup GRAS_sock_info Retrieving data about sockets and peers * \ingroup GRAS_sock * - * Who are you talking to? + * Who are you talking to? */ /* @{*/ /** Get the port number on which this socket is connected on my side */ XBT_PUBLIC(int) gras_socket_my_port (gras_socket_t sock); -/** Get the port number on which this socket is connected on remote side */ +/** @brief Get the port number on which this socket is connected on remote side + * + * This is the port declared on remote side with the + * gras_socket_master() function (if any, or a random number being uniq on + * the remote host). If remote used gras_socket_master() more than once, the + * lastly declared number will be used here. + * + * Note to BSD sockets experts: With BSD sockets, the sockaddr + * structure allows you to retrieve the port of the client socket on + * remote side, but it is of no use (from user perspective, it is + * some random number above 6000). That is why GRAS sockets differ + * from BSD ones here. + */ + XBT_PUBLIC(int) gras_socket_peer_port(gras_socket_t sock); /** Get the host name of the remote side */ XBT_PUBLIC(char *) gras_socket_peer_name(gras_socket_t sock);