Sounds reasonable but it closes for me too. I only got 45 on a win98, 41 on
win95. Curiously when I use both machines at the same time they process 85
(roughly a sum of the two). Also I recently upgraded win98 to view b3 and
now it does 44 (84 between the two).
Perhaps this information will be useful to you. I wonder if it is a memory
issue (either system or port related). I wish you luck in solving it.
Brian
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 17, 2000 4:49 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] Can't get two rebolscripts to message each others
reliably
I'm making a little game in rebol (internet scrabble, currently in Swedish
but could of course easily be translated if somebody is interested :) that
requires two rebol scripts to message each others.
Easy in theory. In practice, they close connection after a number of
messages. I have no idea why. :(
Here's some testing code. If I run this twice and enter 127.0.0.1
(connecting to myself) it sends a total of 121 messages, and then one of
the scripts refuse to accept a connection. I sent it to someone else, there
it made 117 messages or so. But always the same number on the same system,
it seems. I can't really explain this. What am I doing wrong?
REBOL
[Title: "netmsgtest"
Date: 2000-04-17
Author: "Johan R�nnblom"
Purpose: {try to get two rebolscripts to message each other}]
connect: func []
[either error? try [client: open to-url rejoin ["tcp://" otherurl ":8000"]]
[clienturl: to-url rejoin ["tcp://" otherurl ":8001"]
server: open tcp://:8000
mode: "server"
running: receive]
[insert client mold "connected"
close client
clienturl: to-url rejoin ["tcp://" otherurl ":8000"]
server: open tcp://:8001
mode: "client"]]
transmit: func [msg]
[if error? try [client: open clienturl]
[print "Connection closed." close server quit]
insert client mold msg
close client]
receive: func []
[inmsg: do copy first server
if inmsg = "exit" [close server quit]
return inmsg]
otherurl: ask "Enter remote url: "
connect
if mode = "client" [transmit "1"]
forever
[a: receive
print a
b: (to-integer a) + 1
transmit b]
--
/Johan R�nnblom, Team Amiga
Stop worrying so much about this. In the worst case we'll die.