mirror of
https://github.com/logos-messaging/go-multiaddr.git
synced 2026-01-02 13:03:11 +00:00
Merge pull request #165 from multiformats/plaintextv2
add the plaintextv2 protocol
This commit is contained in:
commit
fc723035a2
@ -32,6 +32,7 @@ const (
|
||||
P_NOISE = 0x01c6
|
||||
P_WS = 0x01DD
|
||||
P_WSS = 0x01DE // deprecated alias for /tls/ws
|
||||
P_PLAINTEXTV2 = 0x706c61
|
||||
)
|
||||
|
||||
var (
|
||||
@ -209,6 +210,11 @@ var (
|
||||
Code: P_NOISE,
|
||||
VCode: CodeToVarint(P_NOISE),
|
||||
}
|
||||
protoPlaintextV2 = Protocol{
|
||||
Name: "plaintextv2",
|
||||
Code: P_PLAINTEXTV2,
|
||||
VCode: CodeToVarint(P_PLAINTEXTV2),
|
||||
}
|
||||
protoWS = Protocol{
|
||||
Name: "ws",
|
||||
Code: P_WS,
|
||||
@ -251,6 +257,7 @@ func init() {
|
||||
protoNOISE,
|
||||
protoWS,
|
||||
protoWSS,
|
||||
protoPlaintextV2,
|
||||
} {
|
||||
if err := AddProtocol(p); err != nil {
|
||||
panic(err)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user