gelraen 01.08.2012 23:46 imax

Посаны, я кончил:
send_cmd(Socket, #cmd{type = Type, args = Args, name = Name, from_sid = From, to_sid = To, features = Features}) →
EscapedArgs = lists:map(fun(X) →
[$ , escape(X)]
end, Args),
Data = case Type of
$B →
[Type, Name, $ , From] ++ EscapedArgs;
$C →
[Type, Name] ++ EscapedArgs;
$I →
[Type, Name] ++ EscapedArgs;
$H →
[Type, Name] ++ EscapedArgs;
$D →
[Type, Name, $ , From, $ , To] ++ EscapedArgs;
$E →
[Type, Name, $ , From, $ , To] ++ EscapedArgs;
$F →
[Type, Name, $ , From, $ , Features] ++ EscapedArgs;
$U →
[Type, Name, $ , From] ++ EscapedArgs;
_ →
[]
end,
gen_tcp:send(Socket, [Data, $\n]).

Do you really want to delete ?