File tree 2 files changed +11
-0
lines changed 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,10 @@ func TestConstructSucceeds(t *testing.T) {
149
149
"/ip4/127.0.0.1/ipfs/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSupNKC/tcp/1234/unix/stdio" ,
150
150
"/ip4/127.0.0.1/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSupNKC/tcp/1234/unix/stdio" ,
151
151
"/ip4/127.0.0.1/tcp/9090/http/p2p-webrtc-direct" ,
152
+ "/ip4/127.0.0.1/tcp/127/ws" ,
153
+ "/ip4/127.0.0.1/tcp/127/ws" ,
154
+ "/ip4/127.0.0.1/tcp/127/wss" ,
155
+ "/ip4/127.0.0.1/tcp/127/wss" ,
152
156
}
153
157
154
158
for _ , a := range cases {
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ const (
29
29
P_GARLIC32 = 0x01BF
30
30
P_P2P_WEBRTC_DIRECT = 0x0114
31
31
P_WS = 0x01DD
32
+ P_WSS = 0x01DE
32
33
)
33
34
34
35
var (
@@ -201,6 +202,11 @@ var (
201
202
Code : P_WS ,
202
203
VCode : CodeToVarint (P_WS ),
203
204
}
205
+ protoWSS = Protocol {
206
+ Name : "wss" ,
207
+ Code : P_WSS ,
208
+ VCode : CodeToVarint (P_WSS ),
209
+ }
204
210
)
205
211
206
212
func init () {
@@ -230,6 +236,7 @@ func init() {
230
236
protoUNIX ,
231
237
protoP2P_WEBRTC_DIRECT ,
232
238
protoWS ,
239
+ protoWSS ,
233
240
} {
234
241
if err := AddProtocol (p ); err != nil {
235
242
panic (err )
You can’t perform that action at this time.
0 commit comments