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

Commit

Permalink
refactor(api): follow spec interface
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Sep 6, 2016
1 parent 30461ed commit 937cc17
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/dialer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const toPull = require('stream-to-pull-stream')
const libp2pSPDY = require('../src')

const socket = tcp.connect(9999)
const muxer = libp2pSPDY.dial(toPull(socket))
const muxer = libp2pSPDY.dialer(toPull(socket))

muxer.on('stream', (stream) => {
console.log('-> got new muxed stream')
Expand Down
2 changes: 1 addition & 1 deletion examples/listener.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const libp2pSPDY = require('../src')
const listener = tcp.createServer((socket) => {
console.log('-> got connection')

const muxer = libp2pSPDY.listen(toPull(socket))
const muxer = libp2pSPDY.listener(toPull(socket))

muxer.on('stream', (stream) => {
console.log('-> got new muxed stream')
Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ gulp.task('test:browser:before', (done) => {
const ws = new WSlibp2p()
const mh = multiaddr('/ip4/127.0.0.1/tcp/9095/ws')
listener = ws.createListener((transportSocket) => {
const muxedConn = spdy.listen(transportSocket)
const muxedConn = spdy.listener(transportSocket)
muxedConn.on('stream', (connRx) => {
const connTx = muxedConn.newStream()
pull(connRx, connTx, connRx)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"devDependencies": {
"aegir": "^6.0.1",
"chai": "^3.5.0",
"interface-stream-muxer": "^0.3.1",
"interface-stream-muxer": "^0.4.0",
"libp2p-tcp": "^0.8.0",
"libp2p-websockets": "^0.8.0",
"multiaddr": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion test/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('browser-server', () => {
it('ricochet test', (done) => {
const mh = multiaddr('/ip4/127.0.0.1/tcp/9095/ws')
const transportSocket = ws.dial(mh)
const muxedConn = spdy.dial(transportSocket)
const muxedConn = spdy.dialer(transportSocket)

muxedConn.on('stream', (conn) => {
pull(
Expand Down

0 comments on commit 937cc17

Please sign in to comment.