-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA384

Hi, I made some small steps forward. At least I can send a message and get =
an answer. But only once, I want this to run in a loop on the server and th=
e client side. My actual code now is:

=3D=3D=3D Server
rebol []

c-port: 12345
listen: open/direct/no-wait join tcp://: c-port

waitports: [listen]

print "Listening:"

; wait until something happens
connection: wait waitports
if same? connection listen [
        print [tab "Connected"]
        c-client: first connection

        forever [
                        print [tab "Read message from c-side"]
                        print copy c-client

                        print [tab "Send answer to c-side"]
                        insert c-client "r-side"
        ]
]


=3D=3D=3D Client
rebol []

connection: open/direct/no-wait tcp://localhost:12345

forever [
        print "Sending to Rebol server"
        insert connection "r-side-client"

        print "Receiving from Rebol server"
        prin tab
        while [data: copy connection] [prin data]
        print newline

]


=3D=3D=3D Problem
The client side can only send once because it get stuck in the WHILE loop a=
lways getting some data from the server. The server loops, doesn't read any=
thing from the client and immediately sends out the next message to the cli=
ent.

Is there a way that I can WAIT to "read a message" or "send a message"? I'm=
 missing a way to control/react on the communication direction flow.

- --=20
Robert M. M=FCnch
Management and IT freelancer
http://www.robertmuench.de



-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.9.1 (Build 287)
Charset: iso-8859-15

wsBVAwUBSaFYJnSQa/BbHGLwAQnnwQf6AmlifawzCwI7bKXPXpXvGeCoac0L2DJC
VlA5+BNzwCg/OXjFkD07mN+WDV6yM2zXDWy/HzaK6IPyz3GHmdw/DVU29kp6RqE+
zcn7nRwXPx3edfRbet4lWlBoU4HrHGMsZDTPSSBf0+y1s6chSaLuzGVrnF2hsVgd
REHUhKHlUDA234CWtJaoNXLpHqdXtN+adkRXu0BuPJ92QyKDifQ7/dPU4GRBKGQ9
AQBnBfRmvlPTQZAJfWETP2xX+4uFMhx4jfxpNVKGCIrebWIdqCaq6e3OXBeRSAPS
zyr7GmJLeNQD1mxeHkOMFEReG75Hy2JsUtpU7ogfRgPj3Iqn7N9jIA=3D=3D
=3Dowqz
-----END PGP SIGNATURE-----
-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to