Thanks to Andu. . .and his recommendation
to use Interarchy to watch the data stream I am slowly
making progress on FTP protocol with sockets

So far I can log in and get as far as requesting a port.
But then I hit this anamoly

when MC reads from the socket it
returns data previously sent a few lines before:

after sending:

write "PASV"  & CRLF to socket Q
  read from socket Q for 1 line
  put cr & it after fld "log"
  put it into tReply
  put tReply
  replace ")" with empty in tReply
  set the itemDel to "("
  put item 2 of tReply  into n1
  set itemDel to ","
  put item 1 to 4 of n1 into tIP
  replace "," with "." in tIP

Interarchy shows me that up to that point the server is saying:


Receive data (56 bytes) on stream 33.
>000003D0> 230-You are user #50 of 50 simultaneous users allowed.

Receive data (38 bytes) on stream 33.
>00000408> 230-  
>0000040E> 230 Restricted user logged in.

Send data (6 bytes) on stream 33.
<000000CC< PASV  

Receive data (52 bytes) on stream 33.
>0000042E> 227 Entering Passive Mode (204,94,112,135,202,112)

The last statement being the response from the server after

write "PASV"  & CRLF to socket Q

But (see above script) on the next read from socket for 1 line
variable tReply contains:

>000003D0> 230-You are user #50 of 50 simultaneous users allowed.

And this is the 4th line back from the current server response. . .
so I am unable to parse out the server assigned port number.
Given my total lack of experience in sockets
this beyond my power to debug. Why doesn't MC return the last
server response?

Any insights?  

Hinduism Today
Sivakatirswami

[EMAIL PROTECTED]

"And the man called out, hanging by a small branch from the
edge of a cliff over a deep canyon. "Oh God, Save Me."
A loud voice from heaven replied.
"Relax, let go, I will protect you." The man
replied: "Anyone else up there?"



Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to