Closed cmdrk closed 4 months ago
It seems that if s2c_call and c2s_proto are both specified in the Overworld RPC definition, they have to match else the bindings fall back to using the handler function name for the c2s call.
s2c_call
c2s_proto
e.g.
✔️ works
#{ opcode => ?CHAT_SEND, c2s_handler => {?MODULE, send, 2}, c2s_proto => privmsg, encoder => chat_pb },
#{ opcode => ?CHAT_LIST, c2s_handler => {?MODULE, list, 2}, c2s_proto => plist, s2c_call => plist, encoder => chat_pb },
❌ doesn't work
#{ opcode => ?CHAT_LIST, c2s_handler => {?MODULE, list, 2}, c2s_proto => plist, encoder => chat_pb },
This has been obviated long ago.
It seems that if
s2c_call
andc2s_proto
are both specified in the Overworld RPC definition, they have to match else the bindings fall back to using the handler function name for the c2s call.e.g.
✔️ works
✔️ works
❌ doesn't work