refactor: add getter/setter for isConnected connectionURIs

This commit is contained in:
Derrick Hammer 2024-01-08 09:52:57 -05:00
parent a785031255
commit b41c763be8
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 8 additions and 0 deletions

View File

@ -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
}