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

[REBOL] FTP access via a port spec

From: laurent:giroud:libertysurf at: 4-Oct-2002 0:51

Hello everyone, I am trying to access the ftp server that my ISP set up so I can create my home page(s). Since the username contains an "@" character I have no choice but to use a port spec as specified in the Core user guide ( the following code works well : tiftp: [scheme: 'FTP host: "" port-id: 21 user: "username" pass: "userpass" target: %index.php3] print read tiftp however looking at my firewall status window I noticed that it keeps the port 21 open until it finally times out. The documentation (same url above) also states that things may be done such as this :
>> ftp-port: open [
scheme: 'ftp host: "" user: "Username" ; and yes I set those right ;) pass: "Password" ] But says absolutely nothing about how to specify the file to manipulate. Trying to read from such port results in an error :
>> read ftp-port
** Script Error: read expected source argument of type: file url object block ** Where: halt-view ** Near: read ftp-port I tried all kind of stupid things such as "read ftp-port/index.php3" but did not get much further. And I found nowhere in the docs how such "ftp port" could be actually used. This is very surprising since I can't see the interest of being able to open a ftp port if it can't be used... So I'll have a few questions regarding this "experience" : - would anyone know why does Rebol maintains an opened port despite the fact that the 'read is over ? - does it make sense to use a port spec to access a ftp server ? (assuming the answer is yes) - how can I specify the file to operate upon ? - what does it mean exactly to have an open port open on a ftp server : is it simply an open TCP connection or is it something more elaborate ? I am currently having a very strange feeling about Rebol, it is very powerful to use but the documentation seems insufficient to me on some points like those, which makes it quite painful to do even very simple things. It can be very frustrating at times to see that the documentation opens a new path to explore but does not go any further : there are handlers, schemes and protocols but not much is said of how to build one, what features this or that one provides, and so on... It all seems very powerful but also very osbcure and I would like to know if this feeling is shared by other people on the list ? Thank you in advance ;) Best regards, Laurent -- Laurent Giroud [laurent--giroud--libertysurf--fr]