[erlang-questions] Sending UDP packets
Chandru
chandrashekhar.mullaparthi@REDACTED
Fri Aug 21 15:27:21 CEST 2015
On 21 August 2015 at 13:15, Oscar Muñoz Garrigós <osmuogar@REDACTED> wrote:
> Hi,
> 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?
>
> <snip>
>
> write_to_db(WSocket, WAdress, WMPort, WFrom, WTo, WText)->
> ...
> ...
> Message = analizar_resultados(Respuesta),
>
> {ok, SSocket} = gen_udp:open(0,[inet]),
> %%ok = gen_udp:send(SSocket, WAdress, WMPort, Message), <-------- This
> does not works cause the packet is lost
>
Do you have a stateful firewall between the client and server? Maybe the
firewall is dropping packets because you are originating them from a random
port?
> ok = gen_udp:send(WSocket, WAdress, WMPort, Message), <-------- This
> works but the packet is truncated
>
Is the other end written in Erlang as well or a different language? Could
it be buggy? Can you see your complete packet in a packet capture?
Chandru
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150821/1a8858cc/attachment.htm>
More information about the erlang-questions
mailing list