[tor-commits] [flashproxy/rtmfp] Remove SQSProxyPair.
dcf at torproject.org
dcf at torproject.org
Sun Jun 12 08:56:32 UTC 2011
commit e36a17361895f039409458aeff5e6786c87236eb
Author: David Fifield <david at bamsoftware.com>
Date: Sat Jun 11 14:26:36 2011 -0700
Remove SQSProxyPair.
At the moment it's just dead code.
---
SQSProxyPair.as | 77 -------------------------------------------------------
swfcat.as | 9 ------
2 files changed, 0 insertions(+), 86 deletions(-)
diff --git a/SQSProxyPair.as b/SQSProxyPair.as
deleted file mode 100644
index 20a6a65..0000000
--- a/SQSProxyPair.as
+++ /dev/null
@@ -1,77 +0,0 @@
-package
-{
- import flash.events.Event;
- import flash.events.EventDispatcher;
- import flash.events.IOErrorEvent;
- import flash.events.ProgressEvent;
- import flash.events.SecurityErrorEvent;
- import flash.net.Socket;
- import flash.utils.ByteArray;
-
- public class SQSProxyPair extends ProxyPair
- {
- private var client_socket:Socket;
-
- public function SQSProxyPair(ui:swfcat)
- {
- super(this, ui);
-
- log("Starting SQS proxy pair");
- setup_client_socket();
- }
-
- override public function set client(client_addr:Object):void
- {
- this.client_addr = client_addr;
- log("Client: connecting to " + client_addr.host + ":" + client_addr.port + ".");
- client_socket.connect(client_addr.host, client_addr.port);
- }
-
- override public function close():void
- {
- super.close();
- if (client_socket != null && client_socket.connected) {
- client_socket.close();
- }
- dispatchEvent(new Event(Event.CLOSE));
- }
-
- override public function get connected():Boolean
- {
- return (super.connected && client_socket != null && client_socket.connected);
- }
-
- override protected function transfer_bytes(src:Object, dst:Object, num_bytes:uint):void
- {
- var bytes:ByteArray = new ByteArray();
-
- if (src == null) {
- src = client_socket;
- }
-
- if (dst == null) {
- dst = client_socket;
- }
-
- Socket(src).readBytes(bytes, 0, num_bytes);
- log("SQSProxyPair: transferring " + num_bytes + " bytes.");
- Socket(dst).writeBytes(bytes);
- }
-
- private function setup_client_socket():void
- {
- client_socket = new Socket();
-
- client_socket.addEventListener(Event.CONNECT, function (e:Event):void {
- log("Client: connected to " + client_addr.host + ":" + client_addr.port + ".");
- if (connected) {
- dispatchEvent(new Event(Event.CONNECT));
- }
- });
- client_socket.addEventListener(Event.CLOSE, socket_error("Client: closed"));
- client_socket.addEventListener(IOErrorEvent.IO_ERROR, socket_error("Client: I/O error"));
- client_socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR, socket_error("Client: security error"))
- client_socket.addEventListener(ProgressEvent.SOCKET_DATA, client_to_relay);
- }
- }
-}
diff --git a/swfcat.as b/swfcat.as
index 42bcfea..1281b9f 100644
--- a/swfcat.as
+++ b/swfcat.as
@@ -13,7 +13,6 @@ package
import ProxyPair;
import RTMFPProxyPair;
- import SQSProxyPair;
import TCPProxyPair;
import rtmfp.CirrusSocket;
@@ -257,14 +256,6 @@ package
return new RTMFPProxyPair(this, s_c, s_c.local_stream_name);
}
- // currently is the same as TCPProxyPair
- // could be interesting to see how this works
- // can't imagine it will work terribly well...
- private function sqs_proxy_pair_factory():ProxyPair
- {
- return new SQSProxyPair(this);
- }
-
private function tcp_proxy_pair_factory():ProxyPair
{
return new TCPProxyPair(this);
More information about the tor-commits
mailing list