]> git.meshlink.io Git - meshlink/blobdiff - src/meshlink++.h
Add meshlink_get_self().
[meshlink] / src / meshlink++.h
index 8e0745e4869163bc0fe43688e2712f930ccb1b99..346549013e010aa3bcb28292395a2dd45b1258ca 100644 (file)
@@ -274,6 +274,15 @@ namespace meshlink {
                        return (node *)meshlink_get_node(handle, name);
                }
 
+               /// Get a handle for our own node.
+               /** This function returns a handle for the local node.
+                *
+                *  @return             A pointer to a meshlink::node which represents the local node.
+                */
+               node *get_self() {
+                       return (node *)meshlink_get_self(handle);
+               }
+
                /// Get a list of all nodes.
                /** This function returns a list with handles for all known nodes.
                 *