From 2e12166ba84b661b4f16ae3fd9e581615e2b018a Mon Sep 17 00:00:00 2001 From: David Dias Date: Fri, 19 Aug 2016 14:37:40 +0100 Subject: [PATCH] feat(spec): update the dial interface to cope with new pull additions --- README.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/README.md b/README.md index 2dd0479..cd43b50 100644 --- a/README.md +++ b/README.md @@ -62,8 +62,6 @@ A valid (read: that follows the interface defined) transport, must implement the - type: `Transport` - `new Transport([options])` - `transport.dial(multiaddr, [options, callback])` - - event: 'connect' - - event: 'error' - `transport.createListener([options], handlerFunction)` - type: `transport.Listener` - event: 'listening' @@ -96,12 +94,7 @@ This method dials a transport to the Peer listening on `multiaddr`. `callback` should follow the `function (err, conn)` signature. -`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: - -- `connect` - -- `timeout` - -- `error` - - +`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'. ### Create a listener