mirror of
https://github.com/logos-messaging/go-multiaddr.git
synced 2026-05-21 00:39:29 +00:00
Add webrtc (#179)
* Add x-webrtc * update webrtc protocol * address review comments * fix fmt * update code to 0x118
This commit is contained in:
parent
043a1ee9c8
commit
696f50ab79
@ -36,6 +36,7 @@ const (
|
|||||||
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
|
P_PLAINTEXTV2 = 0x706c61
|
||||||
|
P_WEBRTC = 0x118
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -247,6 +248,11 @@ var (
|
|||||||
Code: P_WSS,
|
Code: P_WSS,
|
||||||
VCode: CodeToVarint(P_WSS),
|
VCode: CodeToVarint(P_WSS),
|
||||||
}
|
}
|
||||||
|
protoWebRTC = Protocol{
|
||||||
|
Name: "webrtc",
|
||||||
|
Code: P_WEBRTC,
|
||||||
|
VCode: CodeToVarint(P_WEBRTC),
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@ -283,6 +289,7 @@ func init() {
|
|||||||
protoWS,
|
protoWS,
|
||||||
protoWSS,
|
protoWSS,
|
||||||
protoPlaintextV2,
|
protoPlaintextV2,
|
||||||
|
protoWebRTC,
|
||||||
} {
|
} {
|
||||||
if err := AddProtocol(p); err != nil {
|
if err := AddProtocol(p); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user