Skip to content

Commit 696f50a

Browse files
authored
Add webrtc (#179)
* Add x-webrtc * update webrtc protocol * address review comments * fix fmt * update code to 0x118
1 parent 043a1ee commit 696f50a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

protocols.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const (
3636
P_WS = 0x01DD
3737
P_WSS = 0x01DE // deprecated alias for /tls/ws
3838
P_PLAINTEXTV2 = 0x706c61
39+
P_WEBRTC = 0x118
3940
)
4041

4142
var (
@@ -247,6 +248,11 @@ var (
247248
Code: P_WSS,
248249
VCode: CodeToVarint(P_WSS),
249250
}
251+
protoWebRTC = Protocol{
252+
Name: "webrtc",
253+
Code: P_WEBRTC,
254+
VCode: CodeToVarint(P_WEBRTC),
255+
}
250256
)
251257

252258
func init() {
@@ -283,6 +289,7 @@ func init() {
283289
protoWS,
284290
protoWSS,
285291
protoPlaintextV2,
292+
protoWebRTC,
286293
} {
287294
if err := AddProtocol(p); err != nil {
288295
panic(err)

0 commit comments

Comments
 (0)