socket-port Sven Hartrumpf (18 Jun 2013 06:38 UTC)
Re: socket-port John Cowan (18 Jun 2013 18:26 UTC)
Re: socket-port Takashi Kato (18 Jun 2013 19:09 UTC)
Re: socket-port Shiro Kawai (18 Jun 2013 21:40 UTC)
(missing)
Re: socket-port Shiro Kawai (18 Jun 2013 21:54 UTC)
Re: socket-port Alex Shinn (19 Jun 2013 00:51 UTC)
Re: socket-port Takashi Kato (19 Jun 2013 20:07 UTC)
Re: socket-port Shiro Kawai (20 Jun 2013 17:30 UTC)

Re: socket-port Takashi Kato 18 Jun 2013 19:03 UTC

On 18/06/2013 20:26, John Cowan wrote:
 > Sven Hartrumpf scripsit:
 >
 >> I fear that an input/output port is not supported in several major
Scheme
 >> implementations. It would be much better to have 'socket-ports' that
 >> returns two values: the input port and the output port.
 >
 > I don't agree, because much of the time you want to both read and write
 > from a socket, certainly in the dominant client-server paradigm.  So you
 > end up wanting to package up the two ports in a single record, and why
 > not make that record behave like a port while you are at it?

I simply didn't consider non-R6RS implementations but if socket-ports
returns 2 ports how could it be safely implemented? If the ports share
the same socket descriptor then closing one port might cause SIGPIPE or
something on the other port. (Might be too much detail but just popped
up in my mind.)

_/_/
Takashi Kato
E-mail: xxxxxx@ymail.com