Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Hide some functions to end-users (gras_trp_block_send/recv; trp module init/exit...
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 7 Apr 2004 21:53:31 +0000 (21:53 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 7 Apr 2004 21:53:31 +0000 (21:53 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@72 48e7efb5-ca39-0410-a469-dd3cf9ba447f

include/transport.h
src/gras/Transport/transport_interface.h

index 2b88d12..123b9f6 100644 (file)
@@ -1,9 +1,8 @@
 /* $Id$ */
 
 /* $Id$ */
 
-/* trp (transport) - send/receive a bunch of bytes                          */
+/* transport - low level communication (send/receive bunches of bytes)      */
 
 
-/* This file implements the public interface of this module, exported to the*/
-/*  other modules of GRAS, but not to the end user.                         */
+/* module's public interface exported to end user.                          */
 
 /* Authors: Martin Quinson                                                  */
 /* Copyright (C) 2004 Martin Quinson.                                       */
 
 /* Authors: Martin Quinson                                                  */
 /* Copyright (C) 2004 Martin Quinson.                                       */
 
 typedef struct s_gras_socket gras_socket_t;
 
 
 typedef struct s_gras_socket gras_socket_t;
 
-/* A plugin type */
-typedef struct gras_trp_plugin_ gras_trp_plugin_t;
-
-/* Module, and get plugin by name */
-gras_error_t gras_trp_init(void);
-
-void         gras_trp_exit(void);
-
 gras_error_t gras_socket_client(const char *host,
                                unsigned short port,
                                unsigned int bufSize,
 gras_error_t gras_socket_client(const char *host,
                                unsigned short port,
                                unsigned int bufSize,
@@ -34,11 +25,4 @@ gras_error_t gras_socket_server(unsigned short port,
 void         gras_socket_close(gras_socket_t *sd);
  
    
 void         gras_socket_close(gras_socket_t *sd);
  
    
-gras_error_t gras_trp_bloc_send(gras_socket_t *sd,
-                               void *data,
-                               size_t size);
-gras_error_t gras_trp_bloc_recv(gras_socket_t *sd,
-                               void *data,
-                               size_t size);
-
 #endif /* GRAS_TRANSPORT_H */
 #endif /* GRAS_TRANSPORT_H */
index a8f84bf..6bb5c03 100644 (file)
 
 #include "gras_private.h"
 
 
 #include "gras_private.h"
 
+/***
+ *** Main user functions
+ ***/
+gras_error_t gras_trp_bloc_send(gras_socket_t *sd,
+                               void *data,
+                               size_t size);
+gras_error_t gras_trp_bloc_recv(gras_socket_t *sd,
+                               void *data,
+                               size_t size);
+
+/* Find which socket needs to be read next */
+gras_error_t 
+gras_trp_select(double timeout,
+               gras_socket_t **dst);
+
+
+/***
+ *** Module declaration 
+ ***/
+gras_error_t gras_trp_init(void);
+void         gras_trp_exit(void);
+
+/***
+ *** Plugin mecanism 
+ ***/
+
+/* A plugin type */
+typedef struct gras_trp_plugin_ gras_trp_plugin_t;
+
+
 /**
  * e_gras_trp_plugin:
  * 
 /**
  * e_gras_trp_plugin:
  * 
@@ -26,16 +56,6 @@ typedef enum e_gras_trp_plugin {
      e_gras_trp_plugin_tcp
 } gras_trp_plugin_type_t;
 
      e_gras_trp_plugin_tcp
 } gras_trp_plugin_type_t;
 
-
-/* Find which socket needs to be read next */
-gras_error_t 
-gras_trp_select(double timeout,
-               gras_socket_t **dst);
-
-/*
-gras_error_t gras_trp_NNN_init(gras_trp_plugin_t **dst);
-*/
-
 /* A plugin type */
 struct gras_trp_plugin_ {
   char          *name;
 /* A plugin type */
 struct gras_trp_plugin_ {
   char          *name;