Skip to content

Commit 76021e3

Browse files
committed
Adding a description of the FIN message for future reference.
Signed-off-by: Aurelien Bouteiller <[email protected]>
1 parent 395fcc4 commit 76021e3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

opal/mca/btl/tcp/btl_tcp_hdr.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@ BEGIN_C_DECLS
3434
#define MCA_BTL_TCP_HDR_TYPE_PUT 2
3535
#define MCA_BTL_TCP_HDR_TYPE_GET 3
3636
#define MCA_BTL_TCP_HDR_TYPE_FIN 4
37+
/* The MCA_BTL_TCP_HDR_TYPE_FIN is a special kind of message sent during normal
38+
* connexion closing. Before the endpoint closes the socket, it performs a
39+
* 1-way handshake by sending a FIN message in the socket. This lets the other
40+
* end of the connexion discriminate between the case in which the peer has
41+
* closed intentionnally (e.g., during MPI_FINALIZE), or unintentionally (e.g.,
42+
* as the result of some transmission or process failure).
43+
* The process initiating the close sends the FIN message but does not wait
44+
* for a 2-way handshake and closes the socket immediately. Thus, the recipient
45+
* of a FIN message can simply close the socket and mark the endpoint as closed
46+
* without error, and without answering a FIN message itself.
47+
*/
3748

3849
struct mca_btl_tcp_hdr_t {
3950
mca_btl_base_header_t base;

0 commit comments

Comments
 (0)