mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 01:24:05 +08:00
opt some
This commit is contained in:
parent
00aea9d1c9
commit
85f3ab8503
@ -39,14 +39,14 @@ func _broad_serve(m *ice.Message, host, port string) {
|
||||
}
|
||||
m.Logs(mdb.IMPORT, BROAD, string(buf[:n]), "from", from)
|
||||
msg := m.Spawn(buf[:n])
|
||||
if m.Cmd(BROAD, kit.Format("%s,%s", msg.Option(tcp.HOST), msg.Option(tcp.PORT))).Length() > 0 {
|
||||
continue
|
||||
}
|
||||
if remote := _broad_addr(m, msg.Option(tcp.HOST), msg.Option(tcp.PORT)); remote != nil {
|
||||
m.Cmd(BROAD, func(value ice.Maps) {
|
||||
m.Logs(mdb.EXPORT, BROAD, kit.Format(value), "to", kit.Format(remote))
|
||||
s.WriteToUDP([]byte(m.Spawn(value).FormatMeta()), remote)
|
||||
})
|
||||
if m.Cmd(BROAD, kit.Format("%s,%s", msg.Option(tcp.HOST), msg.Option(tcp.PORT))).Length() > 0 {
|
||||
continue
|
||||
}
|
||||
mdb.HashCreate(m, msg.OptionSimple(tcp.HOST, tcp.PORT))
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user