mirror of
https://shylinux.com/x/icebergs
synced 2025-05-05 20:57:02 +08:00
add some
This commit is contained in:
parent
ddf48abff8
commit
39908a29b1
@ -2,6 +2,7 @@ package web
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"net"
|
"net"
|
||||||
|
"strings"
|
||||||
|
|
||||||
ice "shylinux.com/x/icebergs"
|
ice "shylinux.com/x/icebergs"
|
||||||
"shylinux.com/x/icebergs/base/aaa"
|
"shylinux.com/x/icebergs/base/aaa"
|
||||||
@ -56,15 +57,9 @@ func init() {
|
|||||||
}},
|
}},
|
||||||
SERVE_START: {Hand: func(m *ice.Message, arg ...string) { gdb.Go(m, _broad_serve) }},
|
SERVE_START: {Hand: func(m *ice.Message, arg ...string) { gdb.Go(m, _broad_serve) }},
|
||||||
SERVE: {Name: "serve port=9020 host", Hand: func(m *ice.Message, arg ...string) { gdb.Go(m, _broad_serve) }},
|
SERVE: {Name: "serve port=9020 host", Hand: func(m *ice.Message, arg ...string) { gdb.Go(m, _broad_serve) }},
|
||||||
ADMIN: {Hand: func(m *ice.Message, arg ...string) {
|
ADMIN: {Hand: func(m *ice.Message, arg ...string) { broadOpen(m) }},
|
||||||
m.ProcessOpen(Domain(m.Option(mdb.NAME), m.Option(tcp.PORT)) + C(m.ActionKey()))
|
DREAM: {Hand: func(m *ice.Message, arg ...string) { broadOpen(m) }},
|
||||||
}},
|
VIMER: {Hand: func(m *ice.Message, arg ...string) { broadOpen(m) }},
|
||||||
DREAM: {Hand: func(m *ice.Message, arg ...string) {
|
|
||||||
m.ProcessOpen(Domain(m.Option(mdb.NAME), m.Option(tcp.PORT)) + C(m.ActionKey()))
|
|
||||||
}},
|
|
||||||
VIMER: {Hand: func(m *ice.Message, arg ...string) {
|
|
||||||
m.ProcessOpen(Domain(m.Option(mdb.NAME), m.Option(tcp.PORT)) + C(m.ActionKey()))
|
|
||||||
}},
|
|
||||||
OPEN: {Hand: func(m *ice.Message, arg ...string) { m.ProcessOpen(Domain(m.Option(mdb.NAME), m.Option(tcp.PORT))) }},
|
OPEN: {Hand: func(m *ice.Message, arg ...string) { m.ProcessOpen(Domain(m.Option(mdb.NAME), m.Option(tcp.PORT))) }},
|
||||||
tcp.SEND: {Hand: func(m *ice.Message, arg ...string) { _broad_send(m, "", "", "", "", arg...) }},
|
tcp.SEND: {Hand: func(m *ice.Message, arg ...string) { _broad_send(m, "", "", "", "", arg...) }},
|
||||||
}, gdb.EventsAction(SERVE_START), mdb.HashAction(mdb.SHORT, "host,port",
|
}, gdb.EventsAction(SERVE_START), mdb.HashAction(mdb.SHORT, "host,port",
|
||||||
@ -72,3 +67,6 @@ func init() {
|
|||||||
mdb.ACTION, "admin,dream,vimer,open", mdb.SORT, "type,name,host,port"), mdb.ClearOnExitHashAction())},
|
mdb.ACTION, "admin,dream,vimer,open", mdb.SORT, "type,name,host,port"), mdb.ClearOnExitHashAction())},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
func broadOpen(m *ice.Message) {
|
||||||
|
m.ProcessOpen(Domain(strings.TrimSuffix(m.Option(mdb.NAME), ".local")+".local", m.Option(tcp.PORT)) + C(m.ActionKey()))
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user