This header contains the C functions needed for Protocol object in the p2p.today project.
It automatically includes BaseConverter.h
Using this requires a compiled copy of the sha2 hashes, provided in
The name of the desired subnet
The length of the desired subnet
The desired transport method
The length of the transport method
Private field which contains the hash ID of this network
subnetID()to safely obtain this value. It is is allocated and calculated on demand only.
The length of this network’s hash ID
- char *
static SubnetStruct *
getSubnet(const char *subnet, size_t subnetSize, const char *encryption, size_t encryptionSize)¶
Constructs an SubnetStruct. This copies all given data into a struct, then returns this struct’s pointer.
A pointer to the resulting
You must use
destroySubnet()on the resulting object, or you will develop a memory leak
SubnetStructand its members
- des – A pointer to the SubnetStruct you wish to destroy