Unverified Commit fc723035 authored by Marten Seemann's avatar Marten Seemann Committed by GitHub

Merge pull request #165 from multiformats/plaintextv2

add the plaintextv2 protocol
parents d7eafbb3 a40b139c
...@@ -32,6 +32,7 @@ const ( ...@@ -32,6 +32,7 @@ const (
P_NOISE = 0x01c6 P_NOISE = 0x01c6
P_WS = 0x01DD P_WS = 0x01DD
P_WSS = 0x01DE // deprecated alias for /tls/ws P_WSS = 0x01DE // deprecated alias for /tls/ws
P_PLAINTEXTV2 = 0x706c61
) )
var ( var (
...@@ -209,6 +210,11 @@ var ( ...@@ -209,6 +210,11 @@ var (
Code: P_NOISE, Code: P_NOISE,
VCode: CodeToVarint(P_NOISE), VCode: CodeToVarint(P_NOISE),
} }
protoPlaintextV2 = Protocol{
Name: "plaintextv2",
Code: P_PLAINTEXTV2,
VCode: CodeToVarint(P_PLAINTEXTV2),
}
protoWS = Protocol{ protoWS = Protocol{
Name: "ws", Name: "ws",
Code: P_WS, Code: P_WS,
...@@ -251,6 +257,7 @@ func init() { ...@@ -251,6 +257,7 @@ func init() {
protoNOISE, protoNOISE,
protoWS, protoWS,
protoWSS, protoWSS,
protoPlaintextV2,
} { } {
if err := AddProtocol(p); err != nil { if err := AddProtocol(p); err != nil {
panic(err) panic(err)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment