<div dir="ltr"><div><div>Hi,<br></div>I am using a server to send some packets. The problem is actually the packets are truncated and my client does not receive the full packet. I created two sockets but only the socket wich receives the packet returns it to the client, if i change it the packet is lost. Could you give me some advice?<br><br></div>Here is the code:<br><div><br><br><br>-behaviour(gen_server).<br>init(_Args)-><br>    ...<br>    {ok,Socket} = gen_udp:open(49900),<br>    {ok, #state{socket=Socket}}.<br><br>handle_info(Info, State)-> <br>    error_logger:info_msg("Received via INFO: ~p~n", [Info]),<br>    {udp, Socket, IP, InPortNo, Packet} = Info,<br>    [{"from",From},{"to",To},{"text",Text}] = parser:read_xml(Packet),<br><br>    write_to_db(Socket, IP, InPortNo, From, To, Text),<br>    {noreply, State}.<br><br>write_to_db(WSocket, WAdress, WMPort, WFrom, WTo, WText)-><br>     ...<br>     ...<br>    Message = analizar_resultados(Respuesta),<br><br>    {ok, SSocket} = gen_udp:open(0,[inet]),<br>    %%ok = gen_udp:send(SSocket, WAdress, WMPort, Message), <-------- This does not works cause the packet is lost<br>    ok = gen_udp:send(WSocket, WAdress, WMPort, Message), <-------- This works but the packet is truncated<br>    gen_udp:close(SSocket),<br>    ok.<br><br><br><br><br><br></div><div>Thank you all for your help.<br></div></div>