[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Concerning listen() and shutdown()



Thank you for your answers on Tue, 12 Nov 1996 12:17:42 +0100:

>>Is it possible to 'listen()' and so something else at the same time
>>with MacPerl
>
>Yes. After you have called listen, you can call the 4-argument variant of
>select on that socket. If the socket is ready for reading, a connection is
>pending.

But if you listen() on a generic socket, accept() will tell you when a
connection is made anyway. My point is that whilst MacPerl is dealing with
that connection (which may take a little time) it cannot (I think) continue
to listen() out for concurrent external attempts to make another
connection. So I don't see how callers can be queued in those
circumstances.

>>Secondly, having entered the listen() state, how can one get out of it if,
>
>Just closing the socket should suffice.

But once in the listen() state ironically MacPerl is deaf to all
entreaties: the Camel continues to gallop round the world whatever you do
or say.

[re shutdown(SOCKET, HOW)]

>     If how is 0, then further receives will be disallowed.  If  how
>     is  1,  then further sends will be disallowed.  If how is 2,
>     then further sends and receives will be disallowed.

Thanks for that, now duly pencilled in the Camel Book...

Alan

>Matthias
>
>-----
>Matthias Neeracher   <neeri@iis.ee.ethz.ch>   http://www.iis.ee.ethz.ch/~neeri
>  "If people are boasting that they use the best tools, you can figure that
>   they can't find any competitive advantage to using those tools, or else
>   they wouldn't be presenting them as a competitive advantage." -- Dave Winer