File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 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) {
149149 "/ip4/127.0.0.1/ipfs/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSupNKC/tcp/1234/unix/stdio" ,
150150 "/ip4/127.0.0.1/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSupNKC/tcp/1234/unix/stdio" ,
151151 "/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" ,
152156 }
153157
154158 for _ , a := range cases {
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ const (
2929 P_GARLIC32 = 0x01BF
3030 P_P2P_WEBRTC_DIRECT = 0x0114
3131 P_WS = 0x01DD
32+ P_WSS = 0x01DE
3233)
3334
3435var (
@@ -201,6 +202,11 @@ var (
201202 Code : P_WS ,
202203 VCode : CodeToVarint (P_WS ),
203204 }
205+ protoWSS = Protocol {
206+ Name : "wss" ,
207+ Code : P_WSS ,
208+ VCode : CodeToVarint (P_WSS ),
209+ }
204210)
205211
206212func init () {
@@ -230,6 +236,7 @@ func init() {
230236 protoUNIX ,
231237 protoP2P_WEBRTC_DIRECT ,
232238 protoWS ,
239+ protoWSS ,
233240 } {
234241 if err := AddProtocol (p ); err != nil {
235242 panic (err )
You can’t perform that action at this time.
0 commit comments