AltME: R3 Protocols

Messages

Rebolek
From the HTTP protocol.
GrahamC
maybe
redis-port/state/awake: :port/awake
should be
redis-port/state/awake: :redis-port/awake
because in our write actor, there is no 'port defined
our => your
just guessing now ... must have breakfast!
Rebolek
I changed the Async part of WRITE to:
            ;  --- ASYNCHRONOUS OPERATION
                unless open? redis-port [cause-error 'Access 'not-open redis-port/spec/ref]
                tcp-port: redis-port/state/tcp-port
                either probe tcp-port/spec/port-state = 'ready [
                    write tcp-port to binary! make-bulk-request data
                ][
                    tcp-port/locals: to binary! make-bulk-request data
                ]
And I setup tcp's awake in OPEN, but the result is still the same, it prints and then it waits.
Ok, breakfast is important! :)
Rebolek
I pushed latest version to GitHub together with %async-test.r3 so ou can look at the version I'm using here.
Andreas
Do you have the console print output you get somewhere gisted?
Rebolek
just a moment...
There's wait after "..Read 5 bytes"
Andreas
mhm
Rebolek
exactly...

GrahamC
don't know what's current but this line should be
https://github.com/rebolek/prot-redis/blob/master/prot-redis.r3#L250
tcp-port/spec/port-state: false or none
GrahamC
could be
tcp-port/awake: :awake-handler
so, your example could be
rp: open redis://192.168.2.11:10
write rp [ SET asynctest true ]
wait [ rp 3 ]
Rebolek
This doesn't help, it's still stuck in the wait loop, even with the change from ASYNC-HANDLER to AWAKE-HANDLER.

Rebolek
During redis:// test I crashed Rebol with "#9910: unspecific" error. I'll try to isolate the problem (but I guess it needs lots of reads and writes on TCP port). Has anybody seens this error before?
GrahamC
I've seen unspecific errors before but never recorded which ones

Rebolek
How can I read multiple TCP responses to one request? When I WAIT on port, I get first response and I can see with Wireshar other responses were sent also, but how do I access hem from Rebol?

Last message posted 486 weeks ago.