wshandler와 분리 중

This commit is contained in:
2023-07-06 00:53:53 +09:00
parent 3c14e7e4c5
commit 8d0f21077d
7 changed files with 108 additions and 1422 deletions

View File

@ -588,10 +588,6 @@ func multicast(conns []*wshandler.Richconn, raw []byte) {
rconn.WriteBytes(raw)
}
}
func multicastTyped[T any](conns []*wshandler.Richconn, msg T) {
bt, _ := json.Marshal(makeTypeMessage(msg))
go multicast(conns, bt)
}
func broadcastTypedMessage[T any](gm *groupInMemory, gid groupID, msg T) {
if gd := gm.groups.find(gid); gd != nil {
@ -1172,7 +1168,7 @@ func (cfg *groupConfig) prepareInMemory(ctx context.Context, region string, type
call := func() {
method, ok := reflect.TypeOf(gm).MethodByName(fn)
if !ok {
logger.Printf("%s message decode failed :", targetbt, msg.Payload, err)
logger.Println("message decode failed :", err, targetbt, msg.Payload)
}
args := []reflect.Value{