feat(readme): add pull-streams documentation

This commit is contained in:
David Dias
2016-08-31 06:41:34 -04:00
parent 5e89a2608b
commit d9f65e0b0c
6 changed files with 111 additions and 34 deletions

View File

@ -23,14 +23,14 @@ describe('listen', () => {
})
it('close listener with connections, through timeout', (done) => {
const mh = multiaddr('/ip4/127.0.0.1/tcp/9091/ipfs/Qmb6owHp6eaWArVbcJJbQSyifyJBttMMjYV76N2hMbf5Vw')
const mh = multiaddr('/ip4/127.0.0.1/tcp/9090/ipfs/Qmb6owHp6eaWArVbcJJbQSyifyJBttMMjYV76N2hMbf5Vw')
const listener = tcp.createListener((conn) => {
pull(conn, conn)
})
listener.listen(mh, () => {
const socket1 = net.connect(9091)
const socket2 = net.connect(9091)
const socket1 = net.connect(9090)
const socket2 = net.connect(9090)
socket1.write('Some data that is never handled')
socket1.end()