libnmdc: isolate constants
This commit is contained in:
parent
ba378a8245
commit
debc14cea3
@ -12,6 +12,11 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
DEFAULT_CLIENT_TAG string = "libnmdc.go"
|
||||
DEFAULT_HUB_NAME string = "(unknown)"
|
||||
)
|
||||
|
||||
type ConnectionState int
|
||||
type HubEventType int
|
||||
|
||||
@ -401,12 +406,12 @@ func (this *HubConnection) worker() {
|
||||
|
||||
func (this *HubConnectionOptions) prepareConnection() *HubConnection {
|
||||
if this.Self.ClientTag == "" {
|
||||
this.Self.ClientTag = "libnmdc.go"
|
||||
this.Self.ClientTag = DEFAULT_CLIENT_TAG
|
||||
}
|
||||
|
||||
hc := HubConnection{
|
||||
Hco: this,
|
||||
HubName: "(unknown)",
|
||||
HubName: DEFAULT_HUB_NAME,
|
||||
State: CONNECTIONSTATE_DISCONNECTED,
|
||||
Users: make(map[string]UserInfo),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user