在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:jmjatlanta/c-multiaddr开源软件地址:https://github.com/jmjatlanta/c-multiaddr开源编程语言:C 98.7%开源软件介绍:c-multiaddrmultiaddr for IPFS in C. Multiaddr provides easy networking protocols nesting, easy encapsulation of extra protocols, easy tunneling, etc.Usage:All you need to include is multiaddr.hMaddr struct:
New Multi Address From String(new_maddr_fs)char addrstr[] = "/ip4/192.168.1.1/" struct maddr a; a=new_maddr_fs(addrstr); Obtaining the byte buffer(.bytes, .bsize[0]):printf("TEST BYTES: %s\n",Var_To_Hex(a.bsize[0], a.bytes)); Var_To_Hex = Byte Buffer to Hex String Hex_To_Var = Hex String to Byte Buffer Encapsulation & Decapsulation(m_encapsulate, m_decapsulate)Remember, Decapsulation happens from right to left, never in reverse, if you have /ip4/udp/ipfs/ if you decapsulate "udp" you will also take out ipfs!
Constructing a multiaddress from bytes:
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论