[erlang-questions] socket unrecv

Ronny Meeus ronny.meeus@REDACTED
Mon Jun 11 20:23:35 CEST 2012


On Mon, Jun 11, 2012 at 4:38 AM, Benoit Chesneau <bchesneau@REDACTED> wrote:
> On Sun, Jun 10, 2012 at 12:27 AM, CGS <cgsmcmlxxv@REDACTED> wrote:
>> Hi Benoit,
>>
>> Forgive my lack of imagination, but how do you manage to listen to the same
>> socket with another process? Can you pass the socket from the other API?
>> Moreover, how do you make the other API to listen after your one without
>> putting it in front of the other API?
>>
>> If you can access and pass the socket from the other API, I think you can
>> bounce back the data toward the same socket (gen_tcp:send/2) because then
>> the other API should receive the same data as the original transmitter
>> (hopefully, the other side won't crash because it doesn't expect reply).
>> But, still, this is only in the case you can receive the packets in the same
>> time with the other API and the other API trashes the original packets
>> (otherwise you just double the data in the other API).
>>
>> CGS
>>
> My case was a little more simpler here :) By API I meant another
> internal code that wasn't supposed to be used by the initial code
> doing the parsing and getting data from the socket.
>
> Anyway I fixed  it by rewriting the first part. It works well now :)
>
> - benoît
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

Hello

on a standard socket interface (for example C) the MSG_PULL option is available.
When this option is specified during the recv call, the data is passed
to the calling application but it also stays present in the socket's
buffers.

Why is it not possible to use this option field in Erlang?

Best regards,
Ronny



More information about the erlang-questions mailing list