[gambit-list] detecting closed ports

Dimitris Vyzovitis vyzo at hackzen.org
Sat Mar 24 05:51:52 EDT 2018


You can't tell if a file descriptor is closed in general, that's not what I
am after.
I just want to know if close-port was applied to the port.

-- vyzo

On Sat, Mar 24, 2018 at 11:43 AM, Adam <adam.mlmb at gmail.com> wrote:

> The BSD/unix API does not allow this for TCP sockets, as in tapping into
> the OS' knowledge of whether a connection was closed, the only way to learn
> that is by trying to write to it.
>
> However with respect to Gambit knowing whether |close-port| was applied on
> a port, of course you should be able to retrieve that.
>
> 2018-03-24 16:29 GMT+08:00 Dimitris Vyzovitis <vyzo at hackzen.org>:
>
>> Is there a reasonable way to detect whether a port has been closed?
>> I want to implement input-port-open? and output-port-open? for r7rs
>> coverage...
>>
>> -- vyzo
>>
>> _______________________________________________
>> Gambit-list mailing list
>> Gambit-list at iro.umontreal.ca
>> https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20180324/cf74ab0e/attachment.htm>


More information about the Gambit-list mailing list