diff options
author | Sem <sembrestels@riseup.net> | 2012-07-28 21:12:54 +0200 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2012-07-28 21:12:54 +0200 |
commit | 24ff6662195222479b4d83d41fa89edc8a3c05d1 (patch) | |
tree | 63aed425a9bae1e13acd12415d8ee65092471e65 /vendors/uploadify/com/adobe/protocols/dict/util/SocketHelper.as | |
parent | 0fa29b2fd0501a2fde5e086be5da22fe1f47f040 (diff) | |
download | elgg-24ff6662195222479b4d83d41fa89edc8a3c05d1.tar.gz elgg-24ff6662195222479b4d83d41fa89edc8a3c05d1.tar.bz2 |
Removed uploadify dependence.
Diffstat (limited to 'vendors/uploadify/com/adobe/protocols/dict/util/SocketHelper.as')
-rw-r--r-- | vendors/uploadify/com/adobe/protocols/dict/util/SocketHelper.as | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/vendors/uploadify/com/adobe/protocols/dict/util/SocketHelper.as b/vendors/uploadify/com/adobe/protocols/dict/util/SocketHelper.as deleted file mode 100644 index feb494b31..000000000 --- a/vendors/uploadify/com/adobe/protocols/dict/util/SocketHelper.as +++ /dev/null @@ -1,49 +0,0 @@ -package com.adobe.protocols.dict.util
-{
- import com.adobe.net.proxies.RFC2817Socket;
- import flash.events.ProgressEvent;
-
- public class SocketHelper
- extends RFC2817Socket
- {
- private var terminator:String = "\r\n.\r\n";
- private var buffer:String;
- public static var COMPLETE_RESPONSE:String = "completeResponse";
-
- public function SocketHelper()
- {
- super();
- buffer = new String();
- addEventListener(ProgressEvent.SOCKET_DATA, incomingData);
- }
-
- private function incomingData(event:ProgressEvent):void
- {
- buffer += readUTFBytes(bytesAvailable);
- buffer = buffer.replace(/250[^\r\n]+\r\n/, ""); // Get rid of all 250s. Don't need them.
- var codeStr:String = buffer.substring(0, 3);
- if (!isNaN(parseInt(codeStr)))
- {
- var code:uint = uint(codeStr);
- if (code == 150 || code >= 200)
- {
- buffer = buffer.replace("\r\n", this.terminator);
- }
- }
-
- while (buffer.indexOf(this.terminator) != -1)
- {
- var chunk:String = buffer.substring(0, buffer.indexOf(this.terminator));
- buffer = buffer.substring(chunk.length + this.terminator.length, buffer.length);
- throwResponseEvent(chunk);
- }
- }
-
- private function throwResponseEvent(response:String):void
- {
- var responseEvent:CompleteResponseEvent = new CompleteResponseEvent();
- responseEvent.response = response;
- dispatchEvent(responseEvent);
- }
- }
-}
\ No newline at end of file |