Server.handle: def of ezmcp@0.1.0.0 Import: import ezmcp@0.1.0.0/src/server.bend as Server Lines 272-283 of ezmcp@0.1.0.0/src/server.bend: https://jend.leeeet.dev/read.txt?path=ezmcp@0.1.0.0/src/server.bend&start_line=272&end_line=283 import Base import ezmcp@0.1.0.0/src/rpc.bend as Rpc # what a server does with one classified message: a request is answered, a # notification or a response is not, an invalid request is a fault def handle(srv: Server, msg: Rpc.Msg) -> Act: match msg: case Rpc.Ask{id, m, params}: answer(id, dispatch(srv, m, params)) case Rpc.Tell{m, params}: Quiet{} case Rpc.Answer{id}: Quiet{} case Rpc.Junk{id, why}: Fault{Rpc.reply(id, Rpc.Err{Rpc.InvalidRequest{}, why})} Uses (8): https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/rpc.bend&name=Code https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/rpc.bend&name=Msg https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/rpc.bend&name=Out https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/rpc.bend&name=reply https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/server.bend&name=Act https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/server.bend&name=Server https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/server.bend&name=answer https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/server.bend&name=dispatch