]> git.meshlink.io Git - meshlink-tiny/blobdiff - src/meshlink-tiny.h
Remove listening sockets.
[meshlink-tiny] / src / meshlink-tiny.h
index 8dbe72512a052b06e3d5a3dab39f2bb9ecd61fd4..a13e627fb6bc200830a4cda4e9d8e50097dd37e3 100644 (file)
@@ -968,40 +968,6 @@ char *meshlink_get_local_address_for_family(struct meshlink_handle *mesh, int ad
  */
 bool meshlink_add_external_address(struct meshlink_handle *mesh) __attribute__((__warn_unused_result__));
 
-/// Get the network port used by the local node.
-/** This function returns the network port that the local node is listening on.
- *
- *  \memberof meshlink_handle
- *  @param mesh          A handle which represents an instance of MeshLink.
- *
- *  @return              This function returns the port number, or -1 in case of an error.
- */
-int meshlink_get_port(struct meshlink_handle *mesh) __attribute__((__warn_unused_result__));
-
-/// Set the network port used by the local node.
-/** This function sets the network port that the local node is listening on.
- *  It may only be called when the mesh is not running.
- *  If unsure, call meshlink_stop() before calling this function.
- *  Also note that if your node is already part of a mesh with other nodes,
- *  that the other nodes may no longer be able to initiate connections to the local node,
- *  since they will try to connect to the previously configured port.
- *
- *  Note that if a canonical address has been set for the local node,
- *  you might need to call meshlink_set_canonical_address() again to ensure it includes the new port number.
- *
- *  \memberof meshlink_handle
- *  @param mesh          A handle which represents an instance of MeshLink.
- *  @param port          The port number to listen on. This must be between 0 and 65535.
- *                       If the port is set to 0, then MeshLink will listen on a port
- *                       that is randomly assigned by the operating system every time meshlink_open() is called.
- *
- *  @return              This function returns true if the port was successfully changed
- *                       to the desired port, false otherwise. If it returns false, there
- *                       is no guarantee that MeshLink is listening on the old port.
- */
-
-bool meshlink_set_port(struct meshlink_handle *mesh, int port) __attribute__((__warn_unused_result__));
-
 /** This function allows the local node to join an existing mesh using an invitation URL generated by another node.
  *  An invitation can only be used if the local node has never connected to other nodes before.
  *  After a successfully accepted invitation, the name of the local node may have changed.
@@ -1544,16 +1510,6 @@ void meshlink_set_node_channel_timeout(struct meshlink_handle *mesh, struct mesh
  */
 void meshlink_hint_address(struct meshlink_handle *mesh, struct meshlink_node *node, const struct sockaddr *addr);
 
-/// Enable or disable zeroconf discovery of local peers
-/** This controls whether zeroconf discovery using the Catta library will be
- *  enabled to search for peers on the local network. By default, it is enabled.
- *
- *  \memberof meshlink_handle
- *  @param mesh    A handle which represents an instance of MeshLink.
- *  @param enable  Set to true to enable discovery, false to disable.
- */
-void meshlink_enable_discovery(struct meshlink_handle *mesh, bool enable);
-
 /// Inform MeshLink that the local network configuration might have changed
 /** This is intended to be used when there is no way for MeshLink to get notifications of local network changes.
  *  It forces MeshLink to scan all network interfaces for changes in up/down status and new/removed addresses,
@@ -1630,17 +1586,6 @@ void meshlink_reset_timers(struct meshlink_handle *mesh);
  */
 void meshlink_set_inviter_commits_first(struct meshlink_handle *mesh, bool inviter_commits_first);
 
-/// Set the URL used to discover the host's external address
-/** For generating invitation URLs, MeshLink can look up the externally visible address of the local node.
- *  It does so by querying an external service. By default, this is http://meshlink.io/host.cgi.
- *  Only URLs starting with http:// are supported.
- *
- *  \memberof meshlink_handle
- *  @param mesh  A handle which represents an instance of MeshLink.
- *  @param url   The URL to use for external address queries, or NULL to revert back to the default URL.
- */
-void meshlink_set_external_address_discovery_url(struct meshlink_handle *mesh, const char *url);
-
 /// Set the scheduling granularity of the application
 /** This should be set to the effective scheduling granularity for the application.
  *  This depends on the scheduling granularity of the operating system, the application's