refactor: add getter/setter for isConnected connectionURIs
This commit is contained in:
parent
a785031255
commit
b41c763be8
|
@ -41,6 +41,8 @@ type Peer interface {
|
|||
Socket() interface{}
|
||||
SetConnected(isConnected bool)
|
||||
IsConnected() bool
|
||||
SetConnectionURIs(uris []*url.URL)
|
||||
ConnectionURIs() []*url.URL
|
||||
}
|
||||
|
||||
type BasePeer struct {
|
||||
|
@ -98,3 +100,9 @@ func (b *BasePeer) Id() *encoding.NodeId {
|
|||
func (b *BasePeer) SetId(id *encoding.NodeId) {
|
||||
b.id = id
|
||||
}
|
||||
func (b *BasePeer) SetConnectionURIs(uris []*url.URL) {
|
||||
b.connectionURIs = uris
|
||||
}
|
||||
func (b *BasePeer) ConnectionURIs() []*url.URL {
|
||||
return b.connectionURIs
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue