X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2472771bffee0a2c29b69a2e2b6206f0bb819af1..2d16ebcee6bde01575b4cd88a853e1ac1c2532bf:/src/gras/Transport/README diff --git a/src/gras/Transport/README b/src/gras/Transport/README index e65d53d255..e883290b2a 100644 --- a/src/gras/Transport/README +++ b/src/gras/Transport/README @@ -13,19 +13,19 @@ discuss using network sockets, or xbt_queue_t structures. IMPLEMENTATION NOTES ABOUT THE SG SIDE This area is quite messy. The thing is that I strived too much to keep -the existing interface, which is lousely inspirated from BSD sockets. +the existing interface, which is loosely inspired from BSD sockets. Vocabulary: Server is the one who created the master socket. Client is the one connecting to that from a remote host. - Their roles keep the same for the whole connexion duration. + Their roles keep the same for the whole connection duration. Sender and Receiver denote the roles during one message exchange. If the server answers to the client, it becomes the sender while the client becomes the receiver. All this seems trivial, but confusion is easy and dangerous. -The connexion story goes that way. When we create a master socket, we +The connection story goes that way. When we create a master socket, we look whether the given port is free on that host or not. For that, we traverse the gras_hostdata_t->ports dynar, which contains gras_sg_portrec_t records. If it's free, we create a socket with a @@ -41,8 +41,8 @@ typedef struct { } s_gras_trp_sg_sock_data_t,*gras_trp_sg_sock_data_t; In GRAS, there is a listener process, in charge of pumping everything -comming from the network and post that to the main user thread. That -to overlap (incomming) communications and computations. +coming from the network and post that to the main user thread. That +to overlap (incoming) communications and computations. In SG, this is done by ensuring that a receive is posted on every opened socket, and having the listener doing a smx_sem_waitany() to find the first ending one (in RL, a select+ddt_recv does the same). @@ -61,7 +61,7 @@ and working sockets, just like in BSD. There is no explicit accept. Master sockets get created by gras_socket_server() and friends. You can recognize them by the fact that the rdv_client field is always NULL. Such sockets are not really used to exchange data, but more to -establish connexions. For actual exchanges, you need a working socket +establish connections. For actual exchanges, you need a working socket created by gras_socket_client() and friends. So, they are created on client side, but the master side will see it as message expeditor when getting a message.