Skip to content

Commit

Permalink
Client now stores StationURLs as structs not strings
Browse files Browse the repository at this point in the history
  • Loading branch information
jonbarrow committed Aug 15, 2023
1 parent 48a9f6b commit b692476
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type Client struct {
sequenceIDIn *Counter
sequenceIDOut *Counter
pid uint32
stationURLs []string
stationURLs []*StationURL
connectionID uint32
pingCheckTimer *time.Timer
pingKickTimer *time.Timer
Expand Down Expand Up @@ -180,12 +180,17 @@ func (client *Client) PID() uint32 {
}

// SetStationURLs sets the clients Station URLs
func (client *Client) SetStationURLs(stationURLs []string) {
func (client *Client) SetStationURLs(stationURLs []*StationURL) {
client.stationURLs = stationURLs
}

// AddStationURL adds the StationURL to the clients StationURLs
func (client *Client) AddStationURL(stationURL *StationURL) {
client.stationURLs = append(client.stationURLs, stationURL)
}

// StationURLs returns the clients Station URLs
func (client *Client) StationURLs() []string {
func (client *Client) StationURLs() []*StationURL {
return client.stationURLs
}

Expand Down

0 comments on commit b692476

Please sign in to comment.