Skip to content
This repository has been archived by the owner on Feb 26, 2021. It is now read-only.

Commit

Permalink
feat(api): dial to dialer, listen to listener
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Sep 6, 2016
1 parent 5aafbe5 commit 30461ed
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions test/conn-properties.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ describe('conn properties are propagated to each stream', () => {
const ltcp = new TCP()
const ma = multiaddr('/ip4/127.0.0.1/tcp/9876')
listener = ltcp.createListener((conn) => {
lMuxer = spdy.listen(conn)
lMuxer = spdy.listener(conn)
lMuxer.on('stream', (conn) => {
pull(conn, conn)
})
})

listener.listen(ma)
dConn = dtcp.dial(ma)
dMuxer = spdy.dial(dConn)
dMuxer = spdy.dialer(dConn)
})

after((done) => {
Expand Down
4 changes: 2 additions & 2 deletions test/spdy-over-tcp.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('spdy-over-tcp', () => {
it('attach to a tcp socket, as listener', (done) => {
const tcpListener = tcp.createListener((socket) => {
expect(socket).to.exist
listener = spdy.listen(socket)
listener = spdy.listener(socket)
expect(listener).to.exist
})

Expand All @@ -35,7 +35,7 @@ describe('spdy-over-tcp', () => {
it('attach to a tcp socket, as dialer', (done) => {
const socket = tcp.dial(mh)
expect(socket).to.exist
dialer = spdy.dial(socket)
dialer = spdy.dialer(socket)
expect(dialer).to.exist
done()
})
Expand Down
4 changes: 2 additions & 2 deletions test/spdy-over-ws.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ describe('spdy-over-ws', () => {

const wsListener = ws.createListener((socket) => {
expect(socket).to.exist
listener = spdy.listen(socket)
listener = spdy.listener(socket)
expect(listener).to.exist
finish()
})

const socket = ws.dial(mh)

wsListener.listen(mh, () => {
dialer = spdy.dial(socket)
dialer = spdy.dialer(socket)
expect(dialer).to.exist
finish()
})
Expand Down
4 changes: 2 additions & 2 deletions test/spdy.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ describe('spdy-generic', () => {
})

it('attach to a duplex stream, as listener', () => {
listener = spdy.listen(listenerSocket)
listener = spdy.listener(listenerSocket)
expect(listener).to.exist
})

it('attach to a duplex stream, as dialer', () => {
dialer = spdy.dial(dialerSocket)
dialer = spdy.dialer(dialerSocket)
expect(dialer).to.exist
})

Expand Down

0 comments on commit 30461ed

Please sign in to comment.