World: r3wp
[!REBOL3 Schemes] Implementors guide
older newer | first last |
Graham 28-Jan-2010 [1929x4] | I'd like to ask how we might manage the download of a large file by thehttp protocol |
Actually I just tried downloading a 16Mb file and it timedout in R3 but downloaded okay in R2. | |
So, it seems you need to open the port instead, and then modify the timeout | |
Maybe what should happen instead is that if you receive other than xml, text, then the data should be streamed a file and a file! returned instead ( like Cheyenne does with html uploads ) ... | |
Pekr 28-Jan-2010 [1933] | BrianH: I think that there is now bunch of examples of schemes, so it might start to become apparent, what is needed :-) |
BrianH 28-Jan-2010 [1934] | After the first of the month, that's the plan. |
Graham 28-Jan-2010 [1935x2] | There are a few schemes now but they're basicall all written by me ... so I don't think there's much variety there. Others have commented that the awake handler should be as small as possible and to keep the state machine outside ... |
If anyone is interested .. this is the "bug" I came across http://developer.amazonwebservices.com/connect/thread.jspa?threadID=41782&tstart=0 I had to change my to-iso8601 function to add the extra precision required. | |
eFishAnt 29-Jan-2010 [1937x2] | aha, cool, those links I was looking for! |
(ports, schemes, etc)... I did get my product mostely working in R3 (large % networking) up to about 90% and to be honest, I didn't put much time into the porting R2 -> R3 yet. | |
Graham 29-Jan-2010 [1939] | Where's the video codec you did?? |
eFishAnt 29-Jan-2010 [1940] | I need to port it to the latest R3. There was a point where the GC got changed and the real-time performance went crazy, and I want to blend it into the new architecture...so I don't want to put out something that requires an old R3 alpha...and the dialect is not 100% clean...guess I'm being kind of a Carl here...not ready for prime-time yet. |
BrianH 29-Jan-2010 [1941] | This is the best place we have now to discuss SSL on R3. |
Andreas 29-Jan-2010 [1942x2] | Fine with me |
How would I implement a ssl:// port scheme in the hostkit, that behaves just as tcp:// does, but allowing me to hook the native actors (open, mainly) | |
BrianH 29-Jan-2010 [1944] | The tcp:// scheme is defined in the host kit, as are all native schemes. |
Andreas 29-Jan-2010 [1945x2] | no, only the tcp device is defined in the hostkit |
how the device is wired up to the tcp:// scheme, is somewhere else | |
BrianH 29-Jan-2010 [1947] | That's all you need. The scheme is a stub. |
Andreas 29-Jan-2010 [1948x2] | And where is that stub? |
How is it wired to the tcp device? | |
BrianH 29-Jan-2010 [1950x2] | Just a few lines of mezz code in mezz-ports.r |
make-scheme [ title: "TCP Networking" name: 'tcp spec: system/standard/port-spec-net info: system/standard/net-info ; for C enums awake: func [event] [print ['TCP-event event/type] true] ] | |
Andreas 29-Jan-2010 [1952x2] | ok |
How does this connect to the hostkit device? | |
BrianH 29-Jan-2010 [1954] | If I knew how to do this, it would be done already. Learning how is on my todo list, but I'm hoping someone else (like you) gets to it first. |
Andreas 29-Jan-2010 [1955x3] | hehe |
fair enough :) | |
I know that we have a array in host-device.c that lists all devices | |
BrianH 29-Jan-2010 [1958] | I only know that it can be done, not how (yet). |
Andreas 29-Jan-2010 [1959x2] | I doubt that it can be done without changes to one of the binary blobs |
I assume that somewhere there is a mapping between indices into this array to names like 'tcp | |
Steeve 29-Jan-2010 [1961] | maybe including a row device allowing to build our own datagrams would be the best :-) |
Andreas 29-Jan-2010 [1962x2] | in reb-device.h we have an enum for those indices |
RDI_NET is the index for the tcp port device | |
BrianH 29-Jan-2010 [1964] | Not assuming that yet. All you have to do is say that you are taking charge of R3 SSL and you will get all the help you need. I would suggest using the Putty SSL code as a start because it's small and license compatible (i.e. not a GPL derivative). |
Graham 29-Jan-2010 [1965] | Hmm... Andreas already volunteered to do the Arm port ...and had no reply. |
Andreas 29-Jan-2010 [1966x4] | And I posted the ready-to-be-merged changes for dll loading on Linux, no reply there |
I'd be happy to give SSL a go, to get something to experiment with | |
The main information I miss for now, is how to wire up a device defined in the hostkit | |
And from all I can see, that is for now somewhere hidden in libr3.so | |
Cyphre 1-Feb-2010 [1970] | Andreas, yes, looks like the symbol table for devices is inside the .so for now. But if you are really impatient, I think it would be possible to override for example 'clipboard device and 'turn' it into sll port? |
ChristianE 17-Feb-2010 [1971] | I'm lost in current somewhat fragmented documentation on asynchronous networking. Does anyone happen to know of an example somewhere on how to do a http request and meanwhile displaying a progress bar or just print some progress info to the console? I know I have to use a AWAKE handler, but I just don't grasp what to do therein. Let's say I want to PRIN "." to the console (or draw something to the GUI) every 0.25 secs the http request is taking . Are there any docs out there on how to accomplish something like that? |
Graham 17-Feb-2010 [1972x4] | You would have to modify the existing awake handler to print. I don't think you can display a progress bar as the only way to update the GUI is by creating a GUI event, and that is not documented yet. |
So, in this example of sending a fax http://rebol.wik.is/Rebol3/R3_GUI/Sendfax.r the net-log function is altered to update the GUI ... but in fact nothing happens until all the network actiivty ceases. | |
In R2 you'd do a wait to allow the GUI to update ... but you can't do a wait inside a wait | |
The http protocol lacks any net-log or debugging so could write one and insert it into the awake handler ... | |
ChristianE 17-Feb-2010 [1976] | Thanks, Graham, your answer is appreciated. I was thinking along the lines of repeatedly waiting on an open http port for only a short while and on every loop iteration updating a busy indicator just to show that something is going on. Sounds like that's not possible, so I think I'll leave it as it is for now. |
Gabriele 18-Feb-2010 [1977] | request-download shows a progress bar. |
Graham 18-Feb-2010 [1978] | >> value? 'request-download == false |
older newer | first last |