libnmdc: isolate constants

This commit is contained in:
mappu 2016-04-03 18:53:14 +12:00
parent ba378a8245
commit debc14cea3

View File

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