Skip to content
This repository was archived by the owner on Mar 11, 2020. It is now read-only.

Commit 2e12166

Browse files
committed
feat(spec): update the dial interface to cope with new pull additions
1 parent 02b3210 commit 2e12166

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

README.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ A valid (read: that follows the interface defined) transport, must implement the
6262
- type: `Transport`
6363
- `new Transport([options])`
6464
- `transport.dial(multiaddr, [options, callback])`
65-
- event: 'connect'
66-
- event: 'error'
6765
- `transport.createListener([options], handlerFunction)`
6866
- type: `transport.Listener`
6967
- event: 'listening'
@@ -96,12 +94,7 @@ This method dials a transport to the Peer listening on `multiaddr`.
9694

9795
`callback` should follow the `function (err, conn)` signature.
9896

99-
`conn` is the same `conn` that gets returned by call, which should follow [`interface-connection`](https://github.com/diasdavid/interface-connection). This `conn` object can emit 3 extra events:
100-
101-
- `connect` -
102-
- `timeout` -
103-
- `error` -
104-
97+
`conn` is the same `conn` that gets returned by call, which should follow [`interface-connection`](https://github.com/diasdavid/interface-connection). `err` is an `Error` instance to signal that the dial was unsuccessful, this error can be a 'timeout' or simply 'error'.
10598

10699
### Create a listener
107100

0 commit comments

Comments
 (0)