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

Am 22.02.2009, 11:51 Uhr, schrieb Petr Krenzelok <[email protected]>:


> Bug here - it should be - insert c-client. You can't insert into
> listening socket, just to derived connection channel.

Hi, ok, I got this now :-).

> But - your script
> will not even get here. You use blocking synchronous communication. In
> this mode, it seems to me, that you stay stuck in the 'copy section,
> until you close the connection on the other side.

Good point and is something I observed too. But it's not documented when us=
ing synchronous mode how to get things transferred. So the listening part h=
angs until the other side closes the socket, than the so far received conte=
nt is returned.

This means, that using synchronous mode isn't feasible to send messages bac=
k and forth over the same socket.

> I don't use any other mode than open/direct/no-wait .... you have to be
> just carefull here - you need to "wait", or the program runs out ...

Ok, thanks. While scanning some other Rebol scripts I saw this sometimes. B=
ut again, the docs are a bit simple on all this. I expect this to be the sa=
me problem in my other post. Because Rebol uses the synchronous mode, I jus=
t can't swap directions. I will look into this /direct/no-wait stuff.

> In your while look, when reading out the data, you can receive empty resu=
lt
> =3D no data, or none =3D other side closed the connection ....

Ok, that maps to socket behavior on the C level. Makes sense.

> If you want better multiplexing, it would be probably better to build wai=
t block,
> along with time interval, so you either get your processing by an event
> received from network, or time timeout ....

Yes, whereas my goal is to just send messages back and forth using the same=
 socket/connection.

> Here's small examples:
> ...

Thanks, this brings me a step forward.

- --=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

wsBVAwUBSaFSjHSQa/BbHGLwAQnaHAgAnGm/ycSuJ7zo41EW7s7EiX7mtiIYYsC1
8kk+yN2lymK7S3n7Fdtp2gWL9Xxe3filMxrmlkej3TeiM7gDZBcySxitb2GW73XS
83aS6QWExqDnmqjjQac7un3cRB+xLps+Ae8nPhTEtmR0t/bYPVSzTL5tHzie0PcL
Bk86bfJ1TBs2Bp6lc7tnwVaSPObVOoZK8MpcphZC3KXJJBe6TcHw/FrS2DEB4xgR
uR4cewn+WDO9UnTB/mpm3OwZfA+naVW2/5b382s6QMJlJHHop12iHGzmuApQWYm9
OOaJg7GsnLr7fyORVGnNZbdGVsb9suVpoqAN3P5NtYOh+vdW2lu0Iw=3D=3D
=3Dq1Ed
-----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