[erlang-questions] gen_tcp question

Sean Hinde <>
Mon Sep 18 10:38:03 CEST 2006


Hi Joe,

If the document does not say that this can only be used in passive  
mode then I read it as saying it should be present and correct in  
active mode. The passage simply refers to "receiving", which should  
mean all receive modes.

FWIW I was referring to active mode in my replies..

I also see that {active, once} is now properly documented which is  
great - it means that the book could describe the very smartest way  
to use sockets :-)

It is truly exciting to see you are back on the book drive. I'm sure  
we are all here to help with your extremely welcome effort!

Finally, for me the book should always refer to best "real world"  
practice. If Ericsson must be persuaded to fix the documentation in  
some areas then even better.

BR,
Sean



On 18 Sep 2006, at 08:54, Joe Armstrong ((TN/EAB)) wrote:

> Hi Sean,
>
> Your assumption is correct - I did read the manual first
> and Jani answered a question that I had not asked.
>
> My origonal example opened the socket in active mode,
> and I'm not using gen_tcp:recv to receive data at all
> so the behaviour of recv is irrelevant.
>
> From what's been said here, it seems I should be setting
> active=false and using recv, rather than doing things the way I was
> doing
> them.
>
> Why all the questions:? I'm writing THE book (at last) this
> means you'll just have to put up with loads of very detailed
> questions. This is because when I say in the book
>
>    " so and so works like this ..."
>
> I want it to be correct
>
> /Joe
>
>
>
>
>> -----Original Message-----
>> From: 
>> [mailto:] On Behalf Of Sean Hinde
>> Sent: den 14 september 2006 15:46
>> To: Erlang Questions
>> Subject: Re: [erlang-questions] gen_tcp question
>>
>>
>> On 14 Sep 2006, at 14:32, Jani Hakala wrote:
>>
>>> "Joe Armstrong (TN/EAB)" <> writes:
>>>
>>>> The behaviour appears not to be documented
>>>>
>>> Meaning of {packet,N} is explained in man inet, inet:setopts The
>>> behaviour of gen_tcp:recv is explained in man gen_tcp
>>
>> Well observed!
>>
>> My assumption (there we go again) was that Joe must have read
>> the documentation in order to have discover the existence of
>> {packet, N}, but found it lacking. Reading the page more
>> carefully now it is clear that it does specify the behaviour.
>>
>> Where you perchance peeking under the hood to discover this
>> option Joe ? :-)
>>
>> Sean
>> _______________________________________________
>> erlang-questions mailing list
>> 
>> http://www.erlang.org/mailman/listinfo/erlang-questions
>>




More information about the erlang-questions mailing list