r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!REBOL3 Schemes] Implementors guide

Andreas
11-Jan-2010
[1147x8]
so i started by changing the read actor to:
		read: func [port [port!]] [
			wait port/state/connection
		]
which should break things hard :)
and yes it does, hangs after SYST
next step: tracing if your awake handler returns true in this case
wuah, huge switch :)
but, as expected, it does not :)
client/spec/ready seems to be a good flag to use as return value 
for the awake handler
unfortunatly, in the AUTH 230 handler, you set both ready to true 
_and_ issue another write
assuming that the SYST is rather worthless anyway, i drop the write
Graham
11-Jan-2010
[1155]
ready is set to true so I can process the SYST
Andreas
11-Jan-2010
[1156]
i'll abuse ready is the return value from the awake handler, for 
now :)
Graham
11-Jan-2010
[1157]
I did this as otherwise I ended up pipelining the ftp server :(
Andreas
11-Jan-2010
[1158]
don't they like that :) ?
Graham
11-Jan-2010
[1159]
not if they don't support pipelining!
Andreas
11-Jan-2010
[1160x2]
:)
btw graham, do you happen to have heard of git?
Graham
11-Jan-2010
[1162]
repository thingy?
Andreas
11-Jan-2010
[1163x2]
yep
used it, by any chance?
Graham
11-Jan-2010
[1165x2]
yes :)
nope ...
Andreas
11-Jan-2010
[1167]
wow, fixed it :)
Graham
11-Jan-2010
[1168]
Umm... does Ubuntu use git ??
Andreas
11-Jan-2010
[1169]
i use git
Graham
11-Jan-2010
[1170]
I know I installed something which failed to work for me ... in downloading 
from the ubuntu repository
Andreas
11-Jan-2010
[1171]
and if you'd be using it too, developing protos together would be 
much more fun :)
Graham
11-Jan-2010
[1172]
so what's the fix?
Andreas
11-Jan-2010
[1173]
dropped the SYST write from 230
Graham
11-Jan-2010
[1174]
I think that might help with directory parsing ...
Andreas
11-Jan-2010
[1175]
made the last "read client" in the read event handler block conditional:
unless client/spec/ready [read client]
Graham
11-Jan-2010
[1176x2]
in case it's an Amiga ftp server ...
:)
Andreas
11-Jan-2010
[1178x2]
returned "client/spec/ready" instead of "false" from the awake
one problem remains: the read after RETR does not return
Graham
11-Jan-2010
[1180x5]
hmm... my 0.0.5 added a return true
on a successful download
so just comment out line 261 ?
write-cmdport/only client [SYST]
so where do I set the state then?
Andreas
11-Jan-2010
[1185x2]
here's a diff of my changes: http://gist.github.com/274796
that's a diff against the 0.0.5 from wik.is
Graham
11-Jan-2010
[1187]
wow .. you managed to nuke my 'read !
Andreas
11-Jan-2010
[1188x6]
hehe :)
now what's expected sequence on the cmd connection for RETR?
ah!!
it completes :)
i'll have to print timestamps to even get an idea how long that stalls 
:)
but now i know that it's 150 for when the transfer starts and 226 
when it finishes
Graham
11-Jan-2010
[1194]
150 is just a mark ... comment
Andreas
11-Jan-2010
[1195]
ok
Graham
11-Jan-2010
[1196]
all those can be ignored