On Wed, Sep 25, 2013 at 05:21:57AM -0700, Pedro Melendez wrote: > Hi Peter! > > Thank you so much for your response! > > I don't understand then what I am doing wrong, this is what I have so > far: > > https://github.com/pmelendez/scheme-test-server/blob/master/mini-tcp-server.scm > > Please notice that the code is dirty because it is a work in progress > and I am kinda stuck.
I tested it out (via csi -s mini-tcp-server.scm) and it kept looping and when I connected with telnet it started printing "Hola" to my telnet client. Is that the correct behaviour? The code itself looks fine to me, from a quick glance. > One detail I forgot to mention is that I am testing this on windows. That's a very important little detail :) There are still some important glitches left on Windows, unfortunately. > Now after your explanation... Is it possible that the behavior is > platform-specific? It shouldn't be, but our Windows implementation uses Winsock select(), which is really Microsoft's own "special" interpretation of POSIX select() which doesn't work on anything except sockets. However, this *should* still work since you're only using tcp ports. Perhaps you're running it from the REPL? The standard input for csi is usually line-buffered, so it's the OS itself which might be blocking the process while reading from stdin for the next command to run. This can be worked around on UNIX by installing the parley egg. However, I don't know if this works on Windows, because of the above-mentioned FUBAR select() implementation. I hope this helps. Cheers, Peter -- http://www.more-magic.net _______________________________________________ Chicken-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-users
