I finally realized it must be a bug in read-io that causes the Network
Timeout error message. Read-io is working fine as long as the server is
sending data to the client. The timeout occurs before any ping command is
sent from the server. I can detect from the read-io on the port when a ping
is sent from the server. There is nothing to explain the problem. To test
this I connected to IRC via Mirc and joined a channel called #rebolgods.
Then I activated the script to connect and join the same channel. The
result is a success and joins the channel. I can then query the nick and
send data to it and see the output in the REBOL console. However, after a
small amount of inactivity and before IRC send a ping the Network Timeout
error occurs. I have looked at the help and determined that I have utilized
the function correctly including the open function. It appears that some
other timing algorithim is not properly accounted for in the read-io
function. This also happend with the copy function on the ports data.
Since read-io is native I assume that it is using copy as an internal
function.
Paul Tretter
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 12, 2000 6:21 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] New network Document
The new network document needs to better reflect the buffers and the open
port object!
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 12, 2000 7:52 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] Any Port Pros available
Can someone explain why read-io cannot receive the ping reply from the
server. It seems to time out. I havenet received a good reason for this
and it has now brought me to a standstill.
Paul Tretter
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Sunday, September 10, 2000 8:59 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] ACCESS ERROR
I get an Access Error message with this script and I am not sure why. Can
anyone help. I have pasted inline and attached. I just want it to connect
and join a channel and stay in the channel at this point.
Thanks for your help.
Paul Tretter
----------------------------------------------
REBOL[]
size: 1000
input-buffer: make string! size
output-buffer: make string! size
irc-port: [
scheme: 'tcp
host: "irc.mindspring.com"
port-id: 6667
]
port: open/direct irc-port
insert port "NICK tret^/"
insert port "USER tret rebol.dyndns.org irc.mindspring.com tret^/"
insert port "JOIN #REBOLGODS^/"
forever [
if 0 < length? input-buffer [clear input-buffer]
read-io port input-buffer size
if find input-buffer "PING" [
insert output-buffer "PONG irc.mindspring.com^/"
write-io port output-buffer size
]
print input-buffer
]
halt
rebol[]
size: 1000
input-buffer: make string! size
output-buffer: make string! size
irc-port: [
scheme: 'tcp
host: "irc.mindspring.com"
port-id: 6667
]
port: open/direct irc-port
insert port "NICK tret^/"
insert port "USER tret rebol.dyndns.org irc.mindspring.com tret^/"
insert port "JOIN #REBOLGODS^/"
forever [
if 0 < length? input-buffer [clear input-buffer]
read-io port input-buffer size
if find input-buffer "PING" [
insert output-buffer "PONG irc.mindspring.com^/"
write-io port output-buffer size
]
print input-buffer
]
halt