Documentation ¶
Index ¶
Constants ¶
View Source
const ( OPEN = "open" CLOSE = "close" ERROR = "error" START = "start" STOP = "stop" )
View Source
const ( HOSTPORT = "hostport" HOSTNAME = "hostname" PROTOCOL = "protocol" LOCALHOST = "localhost" HARD = "hard" MASK = "mask" IP = "ip" )
View Source
const ( RANDOM = "random" CURRENT = "current" BEGIN = "begin" END = "end" )
View Source
const CLIENT = "client"
View Source
const (
DIAL = "dial"
)
View Source
const HOST = "host"
View Source
const (
LISTEN = "listen"
)
View Source
const PORT = "port"
View Source
const SERVER = "server"
View Source
const TCP = "tcp"
Variables ¶
View Source
var Index = &ice.Context{Name: TCP, Help: "通信模块", Commands: map[string]*ice.Command{ ice.CTX_INIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { m.Load() m.Cmd(HOST).Table(func(index int, value map[string]string, head []string) { m.Cmd(HOST, aaa.WHITE, value[IP]) }) }}, ice.CTX_EXIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { m.Richs(CLIENT, "", kit.MDB_FOREACH, func(key string, value map[string]interface{}) { kit.Value(value, kit.Keym(kit.MDB_STATUS), CLOSE) }) m.Richs(SERVER, "", kit.MDB_FOREACH, func(key string, value map[string]interface{}) { kit.Value(value, kit.Keym(kit.MDB_STATUS), CLOSE) }) m.Save(PORT) }}, }, }
Functions ¶
Types ¶
type Conn ¶
type Listener ¶
type Stat ¶
type Stat struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.