Added routines to cleanly shutdown daemon
This still needs more work, but the mechanism now exists
This commit is contained in:
parent
2b0a29a06b
commit
427b5c948f
18 changed files with 265 additions and 108 deletions
|
@ -28,8 +28,10 @@ struct IpfsNodeListenParams {
|
|||
|
||||
void *ipfs_null_connection (void *ptr);
|
||||
void *ipfs_null_listen (void *ptr);
|
||||
int ipfs_null_shutdown();
|
||||
int ipfs_daemon (int argc, char **argv);
|
||||
int ipfs_daemon_start(char* repo_path);
|
||||
int ipfs_daemon_stop();
|
||||
int ipfs_ping (int argc, char **argv);
|
||||
|
||||
#endif // DAEMON_H
|
||||
|
|
|
@ -16,11 +16,9 @@ struct Addresses {
|
|||
/**
|
||||
* initialize the Addresses struct with data. Must add the SwarmAddresses later
|
||||
* @param addresses the struct
|
||||
* @param api the API address (like "/ip4/127.0.0.1/tcp/5001")
|
||||
* @param gateway the gateway address (like "ip4/127.0.0.1/tcp/8080")
|
||||
* @returns true(1) on success, otherwise false(0)
|
||||
*/
|
||||
int repo_config_addresses_new(struct Addresses** addresses, char* api, char* gateway);
|
||||
int repo_config_addresses_new(struct Addresses** addresses);
|
||||
|
||||
/**
|
||||
* clear any memory allocated by a address_new call
|
||||
|
|
|
@ -80,6 +80,7 @@ typedef struct IpfsRouting ipfs_routing;
|
|||
ipfs_routing* ipfs_routing_new_offline (struct IpfsNode* local_node, struct RsaPrivateKey *private_key);
|
||||
// online using secio, should probably be deprecated
|
||||
ipfs_routing* ipfs_routing_new_online (struct IpfsNode* local_node, struct RsaPrivateKey* private_key, struct Stream* stream);
|
||||
int ipfs_routing_online_free(ipfs_routing*);
|
||||
// online using DHT/kademlia, the recommended router
|
||||
ipfs_routing* ipfs_routing_new_kademlia(struct IpfsNode* local_node, struct RsaPrivateKey* private_key, struct Stream* stream);
|
||||
// generic routines
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue