You have to first get an incoming connection on your listen port.
Once you get your TCP connection, then you can start reading/writing
messages from/to it.
I have written some sample code on how to do this at:
http://www.rebol.org/advanced/multisession.html
REBOL version at:
http://www.rebol.org/advanced/multisession.r
This may be more than what you what to do (it handles multiple
connections concurrently) but it is easy to modify for your use.
[ There's a bug that shows up after 1000 characters; you can
email for the fixed version. ]
Alfred
[EMAIL PROTECTED]
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 09, 2000 10:28 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] listen ports
How do I know if I have a message to read in my listen port or not?
port: open tcp://:8000
either ???-what goes here?-??? [
io-port: first port
print copy io-port
close io-port
][
print "Nothing to see here..."
]
close port
Thanks for any help,
Max