AltME: R3 Protocols
Messages
Wednesday 5th June, 2013
GrahamC
21:36
anyway getting too complicated for me ...
Rebolek
21:37
This ASYNC write is old code that doesn't work, it uses some non-existent functions
GrahamC
21:37
I mean if you already set up a hander, why are you rewriting it ?
Rebolek
21:39
I set up the handler for the redis-port and here it's moved to the tcp-port
21:39
It's probably copied from some example.
21:40
From the HTTP protocol.
GrahamC
21:42
maybe
redis-port/state/awake: :port/awake
should be
redis-port/state/awake: :redis-port/awake
21:43
because in our write actor, there is no 'port defined
21:43
our => your
21:43
just guessing now ... must have breakfast!
Rebolek
21:43
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
]
21:44
And I setup tcp's awake in OPEN, but the result is still the same, it prints and then it waits.
21:44
Ok, breakfast is important! :)
Rebolek
21:49
I pushed latest version to GitHub together with %async-test.r3 so ou can look at the version I'm using here.
Andreas
22:12
Do you have the console print output you get somewhere gisted?
Rebolek
22:14
just a moment...
22:15
https://gist.github.com/rebolek/5717776
22:15
There's wait after "..Read 5 bytes"
Andreas
22:23
mhm
Rebolek
22:33
exactly...
Thursday 6th June, 2013
GrahamC
00:54
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
Last message posted 486 weeks ago.