On Thu, Jun 26, 2014 at 8:21 AM, Arne Becker <arne_bec...@genua.de> wrote:
> Hi.
>
>>> +               /* listen and net in gone, queues empty, done */
>>> +               if (lflag && pfd[POLL_NETIN].fd == -1
>>
>> lflag ???
>> warning only one ref in the diff
>>
>
> lflag is a global, the "listen" flag, as in:
> nc -l 127.0.0.1 80
>
> I believe this is correct. Only when we listen do we want to close when
> the network input is gone.
>
> - Arne

i have Zero idea if it is right or wrong, just warn because the symbol
was lonely.
For testing i would do something like nc - l | nc and run something
like iperf3 on both end

iperf client -tcp/udp> nc -l | nc client -tcp/udp> iperf server

For a review i dislike
+       unsigned char stdinbuf[BUFSIZE];
and the memmove on it:

Dear tech savvy, isn it better to malloc a buffer like this instead of
alloca it ?
or just a static buffer would be better so it is in the program mem space ?

If the buffer is fixed, dont bother memmove it, just remember the
begining and the end:
http://en.wikipedia.org/wiki/Circular_buffer

Is there a bunch of macro like TAIL_ ??? available for this ?


-- 
---------------------------------------------------------------------------------------------------------------------
() ascii ribbon campaign - against html e-mail
/\

Reply via email to