[erlang-questions] prim_inet socket incompatible with file:sendfile/2/5

Zabrane Mickael zabrane3@REDACTED
Mon Aug 13 00:06:57 CEST 2012


Hi Lukas,

Sorry for the late response.

Please find attached a minimalistic example.

1> prim_sendfile:start().

and try:
curl http://127.0.0.1:8080/

Nothing happens.
What am I doing wrong?

If I use the standard gen_tcp:accept/1, gen_tcp:recv/2, gen_tcp:send/2 on the socket, sendfile works as expected.
But not with a socket handled by prim_inet. Why?

Thanks for your help.

Regards,
Zabrane


-------------- next part --------------
A non-text attachment was scrubbed...
Name: prim_sendfile.erl
Type: application/octet-stream
Size: 1831 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120813/62f0d044/attachment.obj>
-------------- next part --------------


On Aug 8, 2012, at 11:00 AM, Lukas Larsson wrote:

> Hi!
> 
> There are a couple of reasons why this might not work. Could you show
> me a small example of what you are trying to do?
> 
> Lukas
> 
> On Fri, Jul 27, 2012 at 6:57 PM, Zabrane Mickael <zabrane3@REDACTED> wrote:
>> Hi,
>> 
>> Is there any reason why a client socket created from prim_inet
>> do not work with the new file:sendfile fonction?
>> 
>> I got {error, badarg}.
>> 
>> Any undocumented function to solves this?
>> 
>> Regards,
>> Zabrane
>> 
>> 
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>> 




More information about the erlang-questions mailing list