Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/DarpHome/gorcon
Browse files Browse the repository at this point in the history
  • Loading branch information
MCausc78 committed Oct 3, 2023
2 parents 098d6ba + e9a11d3 commit 427aaf1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ type RCONClient struct {
Connection net.Conn
}

func NewRCONClient(address string) *RCONClient {
func NewRCONClient() *RCONClient {
counter++
return &RCONClient{
Address: address,
RequestID: RequestIDStart + counter - 1,
}
}
Expand All @@ -40,11 +39,12 @@ func (client *RCONClient) RecvPacket() (*Packet, error) {
}

func (client *RCONClient) Connect(address string) error {
connection, err := net.Dial("tcp", client.Address)
connection, err := net.Dial("tcp", address)
if err != nil {
return err
}
client.Connection = connection
client.Address = address
return nil
}

Expand Down

0 comments on commit 427aaf1

Please sign in to comment.