[racket] port open or closed?

From: Jos Koot (jos.koot at telefonica.net)
Date: Thu Oct 20 12:02:28 EDT 2011

Thanks, I'll try that.

-----Original Message-----
From: Matthew Flatt [mailto:mflatt at cs.utah.edu] 
Sent: jueves, 20 de octubre de 2011 16:58
To: Jos Koot
Cc: users at racket-lang.org
Subject: Re: [racket] port open or closed?

At Thu, 20 Oct 2011 15:35:39 +0200, "Jos Koot" wrote:
> May be I am myopic, but I have not found any tools in the docs to check
> whether a port is open or closed. After a port is closed, it may survive.
> would be handy to have:
> 1: a procedure that tells whether or not a port is open.

That's `port-closed?'.

> 2: a procedure that given a closed port, reopens it or returns its path
> other info about the port, for example, it may be an output-string or a
> console)

The `object-name' function tends to give you a path for a file port.

Posted on the users mailing list.