Skip to content
This repository was archived by the owner on Aug 23, 2019. It is now read-only.

update the transports #79

Merged
merged 1 commit into from
Jun 23, 2016
Merged

update the transports #79

merged 1 commit into from
Jun 23, 2016

Conversation

daviddias
Copy link
Member

This PR updates the transport dependencies and adapts swarm to work with the interface-transport and interface-connection, without compromising any guarantees or interface.

pt.peerId = pi.id
callback(null, pt)
proxyConn.setInnerConn(conn)
proxyConn.peerId = pi.id
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this using a setter method, or direct property access?

Copy link
Member Author

@daviddias daviddias Jun 23, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is 'pre Identify factor out', after the refactor it should always be getPeerInfo. I'm just doing things gradually to not break too many at once.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but you could just change the impl on the connection so it is a setter, then you don't need to break anything:

function Connection () {
  // ...
}

Object.setProperty(Connection.prototype, 'peerId', {
  set (id) {
    this._peerId = id
    // other things to do
  }
})

@daviddias daviddias force-pushed the update-transports branch from c86ead4 to e81c4d3 Compare June 23, 2016 17:48
@daviddias daviddias force-pushed the update-transports branch from e81c4d3 to 0ff3a0a Compare June 23, 2016 17:58
@daviddias daviddias merged commit ca75c3c into master Jun 23, 2016
@daviddias daviddias deleted the update-transports branch June 23, 2016 20:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants