AS3 FTP Programming and Socket and ByteArray Classes

Sorry for the storyline, which sounds like an even darker Harry Potter title.

I am trying to use the AS3 Socket class to write a simple FTP program for export as an AIR application in Flex Builder 3. I use an FTP server on my local network to test the program. I can successfully connect to the server (the simple part), but I can not send any commands. I'm sure you should use the ByteArray class to send these commands, but there is some important piece of information that I'm missing, apparently. Does anyone know how to do this? Thank you Dave

+3
source share
8 answers

FTP UTF. ANSI/ASCII. writeMultiByte writeUTFBytes, , Linux. .

, , , ( ).

, , crossdomain, , HTTP. , , 843 .

Adobe:

SWF . 9,0,115,0 SWF 1024 .

HTTP . 9,0,115,0 HTTP, /crossdomain.xml 80, 1024 .

, , FTP , .

+3

, this .

- , - TELNET ( FTP).

+1

FTP-, , . 843 , Flash . , FTP:

2 : . USER, PASS, CWD STOR. - , ByteArray. PASV , .

Mac, Safari, FF, socket.close(), . Windoze . , Event.CLOSE , SERVER . liveocs.

. , Mac, Windows. , , , - Windows, , Flash Player, .

?

+1

, . , , . Socket , ByteArray.

, ? ? , , ? , , .

screencast on gotoAndLearn POP3. , , .

0

100% , ? , HTTP . . , FTP.

0

FTP CRLF . "\ r\n" "\n" .

0

CrossDomain FTP-, .

0

From what I have gathered, you need to send each team one at a time and check the answer before moving on. You should get something from ProgressEvent.SOCKET_DATA

Try this and see what you get in return.

socket.writeUTFBytes("USER "+user+"\n"); socket.flush();

Then you read the answer like this:

var response:String = mySocket.readUTFBytes(mySocket.bytesAvailable);
0
source

Source: https://habr.com/ru/post/1696869/


All Articles