Update README.md

This commit is contained in:
xethyrion 2016-11-10 10:26:10 +02:00 committed by GitHub
parent b11ecd51c5
commit 64fd480954

View file

@ -24,7 +24,9 @@ int bsize[]; //int[1] that contains the real bytes size (Use it whenever using t
* Now the string is: /ip4/192.168.1.1/ * Now the string is: /ip4/192.168.1.1/
* m_encapsulate(&a,"/tcp/8080"); * m_encapsulate(&a,"/tcp/8080");
* Now the string is: /ip4/192.168.1.1/tcp/8080/ * Now the string is: /ip4/192.168.1.1/tcp/8080/
# Constructing a multiaddress from bytes: # Constructing a multiaddress from bytes:
* struct maddr beta; * struct maddr beta;
* beta=new_maddr_fb(a.bytes,a.bsize[0]); //This will already construct back to the string too! * beta=new_maddr_fb(a.bytes,a.bsize[0]); //This will already construct back to the string too!
* printf("B STRING: %s\n",beta.string); //So after encapsulation and decapsulation atm this string would * printf("B STRING: %s\n",beta.string); //So after encapsulation and decapsulation atm this string would