improve client

This commit is contained in:
Daniel 2024-08-04 15:29:42 -04:00
parent 2d1b3c3d1a
commit 0eb2fdd293

View file

@ -77,6 +77,7 @@ func main() {
log.Fatal("dial:", err) log.Fatal("dial:", err)
} }
defer c.Close() defer c.Close()
log.Printf("connected")
done := make(chan struct{}) done := make(chan struct{})
@ -99,10 +100,15 @@ func main() {
switch v := m.ToClientMessage.(type) { switch v := m.ToClientMessage.(type) {
case *pb.Message_Call: case *pb.Message_Call:
log.Printf("%#v", v)
case *pb.Message_Notification: case *pb.Message_Notification:
log.Println(v.Notification.Msg) log.Println(v.Notification.Msg)
default:
log.Printf("received other message not known")
} }
} else {
log.Printf("received other msg")
} }
} }
}() }()