X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fmeshlink.h;h=5ac1e84df7f38ff26e5e8a78bd71d77b5b80f694;hb=7fb2124933d86cdc5a48664ae2bbd5f3a249692f;hp=668d8e71501c393bd8d14e3e13cfebf9fe8dc748;hpb=2de31bfc1a24d6643763f6ef1bbda2948ec46f3a;p=meshlink diff --git a/src/meshlink.h b/src/meshlink.h index 668d8e71..5ac1e84d 100644 --- a/src/meshlink.h +++ b/src/meshlink.h @@ -443,6 +443,10 @@ extern bool meshlink_add_address(meshlink_handle_t *mesh, const char *address); * Also note that if you have a dynamic IP address, or are behind carrier-grade NAT, * there is no guarantee that the external address will be valid for an extended period of time. * + * This function is blocking. It can take several seconds before it returns. + * There is no guarantee it will be able to resolve the external address. + * Failures might be because by temporary network outages. + * * @param mesh A handle which represents an instance of MeshLink. * * @return This function returns a pointer to a C string containing the discovered external address, @@ -511,6 +515,12 @@ extern char *meshlink_invite(meshlink_handle_t *mesh, const char *name); * An invitation can only be used if the local node has never connected to other nodes before. * After a succesfully accepted invitation, the name of the local node may have changed. * + * This function may only be called on a mesh that has not been started yet and which is not already part of an existing mesh. + * + * This function is blocking. It can take several seconds before it returns. + * There is no guarantee it will perform a successful join. + * Failures might be caused by temporary network outages, or by the invitation having expired. + * * @param mesh A handle which represents an instance of MeshLink. * @param invitation A nul-terminated C string containing the invitation URL. * After this function returns, the application is free to overwrite or free @a invitation @a. @@ -628,7 +638,8 @@ typedef void (*meshlink_channel_receive_cb_t)(meshlink_handle_t *mesh, meshlink_ * * @param mesh A handle which represents an instance of MeshLink. * @param channel A handle for the channel. - * @param len The maximum amount of data that is guaranteed to be accepted by meshlink_channel_send(). + * @param len The maximum amount of data that is guaranteed to be accepted by meshlink_channel_send(), + * or 0 in case of an error. */ typedef void (*meshlink_channel_poll_cb_t)(meshlink_handle_t *mesh, meshlink_channel_t *channel, size_t len);