mirror of
https://github.com/logos-messaging/go-multiaddr.git
synced 2026-01-05 22:43:10 +00:00
Update naming
This commit is contained in:
parent
123bf94ac9
commit
fa328bf614
@ -59,7 +59,7 @@ m2.Equal(m1)
|
||||
|
||||
```go
|
||||
// get the multiaddr protocol description objects
|
||||
ma.Protocols()
|
||||
m1.Protocols()
|
||||
// []Protocol{
|
||||
// Protocol{ Code: 4, Name: 'ip4', Size: 32},
|
||||
// Protocol{ Code: 17, Name: 'udp', Size: 16},
|
||||
@ -69,9 +69,9 @@ ma.Protocols()
|
||||
#### En/decapsulate
|
||||
|
||||
```go
|
||||
m.Encapsulate(ma.NewMultiaddr("/sctp/5678"))
|
||||
ma.Encapsulate(ma.NewMultiaddr("/sctp/5678"))
|
||||
// <Multiaddr /ip4/127.0.0.1/udp/1234/sctp/5678>
|
||||
m.Decapsulate(ma.NewMultiaddr("/udp")) // up to + inc last occurrence of subaddr
|
||||
ma.Decapsulate(ma.NewMultiaddr("/udp")) // up to + inc last occurrence of subaddr
|
||||
// <Multiaddr /ip4/127.0.0.1>
|
||||
```
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user