Skip to content

Commit 33bac2f

Browse files
committed
Merge pull request #20 from jbenet/rename-websockets-ws
rename websockets to ws
2 parents 7dabdf3 + 1657bea commit 33bac2f

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/protocols.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ code size name
1010
421 V ipfs
1111
480 0 http
1212
443 0 https
13-
477 0 websockets
13+
477 0 ws
1414
444 10 onion

src/protocols.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Protocols.table = [
4141
[421, Protocols.lengthPrefixedVarSize, 'ipfs'],
4242
[480, 0, 'http'],
4343
[443, 0, 'https'],
44-
[477, 0, 'websockets']
44+
[477, 0, 'ws']
4545
]
4646

4747
Protocols.names = {}

test/convert.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe('convert', () => {
2424
describe('.toBuffer', () => {
2525
it('defaults to hex conversion', () => {
2626
expect(
27-
convert.toBuffer('websockets', 'c0a80001')
27+
convert.toBuffer('ws', 'c0a80001')
2828
).to.be.eql(
2929
new Buffer([192, 168, 0, 1])
3030
)
@@ -43,7 +43,7 @@ describe('convert', () => {
4343

4444
it('defaults to hex conversion', () => {
4545
expect(
46-
convert.toString('websockets', new Buffer([192, 168, 0, 1]))
46+
convert.toString('ws', new Buffer([192, 168, 0, 1]))
4747
).to.be.eql(
4848
'c0a80001'
4949
)

test/index.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ describe('manipulation', () => {
105105
const ipfsAddr = multiaddr('/ipfs/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSupNKC')
106106
const ip6Addr = multiaddr('/ip6/2001:8a0:7ac5:4201:3ac9:86ff:fe31:7095')
107107
const tcpAddr = multiaddr('/tcp/8000')
108-
const webAddr = multiaddr('/websockets')
108+
const webAddr = multiaddr('/ws')
109109

110110
expect(
111111
multiaddr('/')
@@ -258,21 +258,21 @@ describe('variants', () => {
258258
})
259259

260260
it('ip4 + tcp + websockets', () => {
261-
const str = '/ip4/127.0.0.1/tcp/8000/websockets'
261+
const str = '/ip4/127.0.0.1/tcp/8000/ws'
262262
const addr = multiaddr(str)
263263
expect(addr).to.have.property('buffer')
264264
expect(addr.toString()).to.equal(str)
265265
})
266266

267267
it('ip6 + tcp + websockets', () => {
268-
const str = '/ip6/2001:8a0:7ac5:4201:3ac9:86ff:fe31:7095/tcp/8000/websockets'
268+
const str = '/ip6/2001:8a0:7ac5:4201:3ac9:86ff:fe31:7095/tcp/8000/ws'
269269
const addr = multiaddr(str)
270270
expect(addr).to.have.property('buffer')
271271
expect(addr.toString()).to.equal(str)
272272
})
273273

274274
it('ip6 + tcp + websockets + ipfs', () => {
275-
const str = '/ip6/2001:8a0:7ac5:4201:3ac9:86ff:fe31:7095/tcp/8000/websockets/ipfs/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSupNKC'
275+
const str = '/ip6/2001:8a0:7ac5:4201:3ac9:86ff:fe31:7095/tcp/8000/ws/ipfs/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSupNKC'
276276
const addr = multiaddr(str)
277277
expect(addr).to.have.property('buffer')
278278
expect(addr.toString()).to.equal(str)

0 commit comments

Comments
 (0)