Repair minor flaws in wormhole function docs
[ric-plt/lib/rmr.git] / doc / src / man / rmr_wh_open.3.xfm
index 5b26cf3..45a1249 100644 (file)
@@ -1,7 +1,7 @@
 .if false
 ==================================================================================
-       Copyright (c) 2019 Nokia 
-       Copyright (c) 2018-2019 AT&T Intellectual Property.
+   Copyright (c) 2019-2020 Nokia
+   Copyright (c) 2018-2020 AT&T Intellectual Property.
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
 .fi
 
 .if false
-       Mnemonic        rmr_wh_open.xfm
-       Abstract        The manual page for the rmr_wh_open function.
-       Author          E. Scott Daniels
-       Date            20 February 2019
+    Mnemonic    rmr_wh_open.xfm
+    Abstract    The manual page for the rmr_wh_open function.
+    Author      E. Scott Daniels
+    Date        20 February 2019
 .fi
 
 .gv e LIB lib
-.im &{lib}/man/setup.im 
+.im &{lib}/man/setup.im
 
 &line_len(6i)
 
 &h1(RMR Library Functions)
 &h2(NAME)
-       rmr_wh_open
+    rmr_wh_open
 
 &h2(SYNOPSIS)
 &indent
 &ex_start
 #include <rmr/rmr.h>
 
-void* rmr_wh_open( void* vctx, char* target )
+rmr_whid_t rmr_wh_open( void* vctx, char* target )
 &ex_end
 
 &uindent
 
 &h2(DESCRIPTION)
 The &cw(rmr_wh_open) function creates a direct link for sending, a wormhole, to another
-RMr based process.
+RMR based process.
 Sending messages through a wormhole requires that the connection be established overtly
 by the user application (via this function), and that the ID returned by &cw(rmr_wh_open)
 be passed to the &cw(rmr_wh_send_msg) function.
 
 &space
-&ital(Target) is the &ital(name:port,) or &ital(IP-address:port,) combination of the 
-processess that the wormhole should be connected to.  
-&ital(Vctx) is the RMr void context pointer that was returned by the &cw(rmr_init) function.
+&ital(Vctx) is the RMR void context pointer that was returned by the &cw(rmr_init) function.
+&ital(Target) is the &ital(name and port,) or &ital(IP-address and port,) combination for
+the process that the wormhole should be connected to.  For example, "localhost:6123".
 
 &space
-When invoked, this function immediatly attempts to connect to the target process. 
-If the connection cannot be established, an error is returned to the caller, and no 
-direct messages can be sent to the target. 
+When invoked, this function immediately attempts to connect to the target process.
+If the connection cannot be established, an error is returned to the caller, and no
+direct messages can be sent to the target.
 Once a wormhole is connected, the underlying transport mechanism (e.g. NNG) will provide
 reconnects should the connection be lost, however the handling of messages sent when
 a connection is broken is undetermined as each underlying transport mechanism may handle
@@ -66,21 +66,21 @@ buffering and retries differently.
 
 
 &h2(RETURN VALUE)
-The &cw(rmr_wh_open) function returns a type &cw(rmr_whid_t) which must be passed to 
-the &cw(rmr_wh_send_msg) function when sending a message. 
+The &cw(rmr_wh_open) function returns a type &cw(rmr_whid_t) which must be passed to
+the &cw(rmr_wh_send_msg) function when sending a message.
 The id may also be tested to determine success or failure of the connection by
-using the RMR_WH_CONNECTED macro and passing the ID as the parameter; a result of 
-1 indicates that the connection was esablished and that the ID is valid.
+using the RMR_WH_CONNECTED macro and passing the ID as the parameter; a result of
+1 indicates that the connection was established and that the ID is valid.
 
 &h2(ERRORS)
 The following error values are specifically set by this RMR function. In some cases the
 error message of a system call is propagated up, and thus this list might be incomplete.
 
 &beg_dlist(.75i : ^&bold_font )
-&di(EINVAL) A parameter passed was not valid.
-&di(EACCESS) The user applicarion does not have the ability to establish a wormhole to the
-               indicated target (or maybe any target).
-&di(ECONNREFUSED) The connection was refused.
+&ditem(EINVAL) A parameter passed was not valid.
+&ditem(EACCESS) The user application does not have the ability to establish a wormhole to the
+        indicated target (or maybe any target).
+&ditem(ECONNREFUSED) The connection was refused.
 &end_dlist
 
 &h2(EXAMPLE)
@@ -90,8 +90,8 @@ error message of a system call is propagated up, and thus this list might be inc
 
    rmc = rmr_init( "43086", 4096, 0 ); // init context
    wh = rmr_wh_open( rmc, "localhost:6123" );
-   if( !RMR_WH_CONNECTED( wh ) ) { 
-        fprintf( stderr, "unable to connect wormhole: %s\n",
+   if( !RMR_WH_CONNECTED( wh ) ) {
+     fprintf( stderr, "unable to connect wormhole: %s\n",
              strerror( errno ) );
    }
 &ex_end
@@ -113,6 +113,7 @@ rmr_has_str(3),
 rmr_tokenise(3),
 rmr_mk_ring(3),
 rmr_ring_free(3),
+rmr_wh_close(3),
 rmr_wh_send_msg(3),
-rmr_wh_close(3)
+rmr_wh_state(3)
 .ju on