write(This, #protocol_struct_begin{}) -> ok;
write(This, struct_end) -> ok;
-
-
write(This, {bool, true}) -> write(This, {byte, 1});
write(This, {bool, false}) -> write(This, {byte, 0});
Args) ->
Params = Service:function_info(Function, params_type),
{struct, PList} = Params,
- case length(PList) of
- N when N =/= length(Args) ->
+ if
+ length(PList) =/= length(Args) ->
throw({return, {error, {bad_args, Function, Args}}});
- _ -> ok
+ true -> ok
end,
Begin = #protocol_message_begin{name = atom_to_list(Function),
handle_reply(State, Function, ReplyType)
end.
-
handle_reply(State = #state{protocol = Proto,
service = Service},
Function,