Starting to make the daemon more intelligent
This commit is contained in:
parent
fbd862431c
commit
f8e4286740
7 changed files with 98 additions and 8 deletions
37
core/net.c
Normal file
37
core/net.c
Normal file
|
@ -0,0 +1,37 @@
|
|||
|
||||
#include "ipfs/core/net.h"
|
||||
|
||||
/**
|
||||
* Do a socket accept
|
||||
* @param listener the listener
|
||||
* @returns true(1) on success, false(0) otherwise
|
||||
*/
|
||||
int ipfs_core_net_accept(struct IpfsListener listener) {
|
||||
//TODO: Implement this
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Listen using a particular protocol
|
||||
* @param node the node
|
||||
* @param protocol the protocol to use
|
||||
* @param listener the results
|
||||
* @returns true(1) on success, false(0) otherwise
|
||||
*/
|
||||
int ipfs_core_net_listen(struct IpfsNode* node, char* protocol, struct IpfsListener* listener){
|
||||
// TODO: Implement this
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***
|
||||
* Dial a peer
|
||||
* @param node this node
|
||||
* @param peer_id who to dial
|
||||
* @param protocol the protocol to use
|
||||
* @param stream the resultant stream
|
||||
* @returns true(1) on success, otherwise false(0)
|
||||
*/
|
||||
int ipsf_core_net_dial(struct IpfsNode* node, char* peer_id, char* protocol, struct Stream* stream) {
|
||||
//TODO: Implement this
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue