/** \name Socket creation functions
* \ingroup GRAS_sock
*/
-/*@{*/
+/* @{*/
/** \brief Opaque type describing a socket */
typedef struct s_gras_socket *gras_socket_t;
xbt_error_t gras_socket_client_ext(const char *host,
unsigned short port,
unsigned long int bufSize,
- int raw,
+ int measurement,
/* OUT */ gras_socket_t *dst);
/** \brief Create a server socket, full interface to all relevant settings */
xbt_error_t gras_socket_server_ext(unsigned short port,
unsigned long int bufSize,
- int raw,
+ int measurement,
/* OUT */ gras_socket_t *dst);
-/*@}*/
+/* @}*/
/** \name Retrieving data about sockets and peers
* \ingroup GRAS_sock
*
* Who are you talking to?
*/
-/*@{*/
+/* @{*/
/** Get the port number on which this socket is connected on my side */
int gras_socket_my_port (gras_socket_t sock);
int gras_socket_peer_port(gras_socket_t sock);
/** Get the host name of the remote side */
char *gras_socket_peer_name(gras_socket_t sock);
-/*@}*/
+/* @}*/
-/** \name Using raw sockets
+/** \name Using measurement sockets
* \ingroup GRAS_sock
*
* You may want to use sockets not to exchange valuable data (in messages),
- * but to conduct some experiments such as bandwidth measurement. If so, try those raw sockets.
+ * but to conduct some bandwidth measurements and related experiments. If so, try those measurement sockets.
*
- * You can only use those functions on sockets openned with the "raw" boolean set to true.
+ * You can only use those functions on sockets openned with the "measurement" boolean set to true.
*
- * \bug Raw sockets are not fully functionnal yet.
*/
-/*@{*/
+/* @{*/
-xbt_error_t gras_socket_raw_send(gras_socket_t peer,
+
+
+int gras_socket_is_meas(gras_socket_t sock);
+xbt_error_t gras_socket_meas_send(gras_socket_t peer,
unsigned int timeout,
unsigned long int expSize,
unsigned long int msgSize);
-xbt_error_t gras_socket_raw_recv(gras_socket_t peer,
+xbt_error_t gras_socket_meas_recv(gras_socket_t peer,
unsigned int timeout,
unsigned long int expSize,
unsigned long int msgSize);
-
-/*@}*/
+xbt_error_t gras_socket_meas_accept(gras_socket_t peer,gras_socket_t *accepted);
+
+/* @}*/
/** \name Using files as sockets
* \ingroup GRAS_sock
*
* \bug Don't use '-' on windows. this file represents stdin or stdout, but I failed to deal with it on windows.
*/
-/*@{*/
+/* @{*/
/* debuging functions */
xbt_error_t gras_socket_client_from_file(const char*path,
/* OUT */ gras_socket_t *dst);
xbt_error_t gras_socket_server_from_file(const char*path,
/* OUT */ gras_socket_t *dst);
-/*@}*/
+/* @} */
#endif /* GRAS_TRANSPORT_H */