Skip to content

Commit

Permalink
Merge pull request #165 from multiformats/plaintextv2
Browse files Browse the repository at this point in the history
add the plaintextv2 protocol
  • Loading branch information
marten-seemann authored Sep 20, 2021
2 parents d7eafbb + a40b139 commit fc72303
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions protocols.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const (
P_NOISE = 0x01c6
P_WS = 0x01DD
P_WSS = 0x01DE // deprecated alias for /tls/ws
P_PLAINTEXTV2 = 0x706c61
)

var (
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -251,6 +257,7 @@ func init() {
protoNOISE,
protoWS,
protoWSS,
protoPlaintextV2,
} {
if err := AddProtocol(p); err != nil {
panic(err)
Expand Down

0 comments on commit fc72303

Please sign in to comment.