mirror of
https://github.com/onyx-and-iris/q3rcon.git
synced 2024-11-25 01:50:47 +00:00
reword
This commit is contained in:
parent
a7702c8050
commit
05ee3f1912
@ -54,7 +54,9 @@ func main() {
|
||||
|
||||
#### `WithLoginTimeout(timeout time.Duration)`
|
||||
|
||||
If the server was just started or is currently performing a long operation like map rotating then it's possible to receive empty rcon responses. In which case you'll want to retry login. Use this functional option to set the max timeout for logins, it defaults to 5 seconds. For example:
|
||||
If the server was just started or is currently performing a long operation like map rotating then it's possible to receive empty rcon responses. In which case you'll want to retry login. Use this functional option to set the max timeout for logins, it defaults to 5 seconds.
|
||||
|
||||
For example:
|
||||
|
||||
```go
|
||||
rcon, err := q3rcon.New(
|
||||
@ -64,7 +66,7 @@ rcon, err := q3rcon.New(
|
||||
|
||||
#### `WithDefaultTimeout(timeout time.Duration)`
|
||||
|
||||
You may want to change the default timeout if some of your responses are getting mixed together (stability can depend on connection to the server). For example, on LAN I can leave the default at 20ms, when connecting remotely I normally increase this to 50ms.
|
||||
You may want to change the default timeout if some of your responses are getting mixed together (stability can depend on connection to the server). For example, over localhost I can leave the default at 20ms, when connecting remotely I normally increase this to 50ms.
|
||||
|
||||
For example:
|
||||
|
||||
|
@ -68,8 +68,7 @@ func main() {
|
||||
}
|
||||
|
||||
func connectRcon(host string, port int, password string) (*q3rcon.Rcon, error) {
|
||||
rcon, err := q3rcon.New(
|
||||
host, port, password)
|
||||
rcon, err := q3rcon.New(host, port, password)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user