Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] direct http port access for web proxy

From: anton::lexicon::net at: 6-Apr-2002 19:05

Hello, I am working on a web-proxy that runs locally on my machine. I have had it running without the /direct refinement and it works ok, but because it buffers all the data in memory, the browser might time out waiting for a large file from my proxy. Hence, I am trying now to deliver data in chunks, but I am having trouble getting the request. Essentially I am doing it like this: listen-port: open/binary/direct tcp://:8080 ; now wait for browser to make a request http-port: first wait listen-port ; This causes network timeout error... while [data: copy/part http-port 1024][append request data] ; now examine the request to discover the url, ; run off and get the data in chunks and ; write it back to the http-port This is the error: ** Access Error: Network timeout ** Where: forever ** Near: probe data: copy/part http-port 1024 Has anyone got any pointers or links to docs for this? I have read the core2.3.pdf on ports and had a bit of a trawl through the script library but failed to find a sufficiently similar example. Anton.