overworld
overworld copied to clipboard
bindings for c2s_proto not working occasionally
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.
e.g.
✔️ works
#{
opcode => ?CHAT_SEND,
c2s_handler => {?MODULE, send, 2},
c2s_proto => privmsg,
encoder => chat_pb
},
✔️ works
#{
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
},