commit 53aecf9837f1dd95d005aaea8a116907488927ea Author: David Fifield david@bamsoftware.com Date: Sat Jun 11 22:19:30 2011 -0700
Remove unused code. --- FacilitatorSocket.as | 100 ------------------ RTMFPProxyPair.as | 101 ------------------ TCPProxyPair.as | 77 -------------- events/FacilitatorSocketEvent.as | 24 ----- rtmfp/CirrusSocket.as | 142 -------------------------- rtmfp/RTMFPSocket.as | 202 ------------------------------------- rtmfp/RTMFPSocketClient.as | 46 --------- rtmfp/events/CirrusSocketEvent.as | 22 ---- rtmfp/events/RTMFPSocketEvent.as | 25 ----- 9 files changed, 0 insertions(+), 739 deletions(-)
diff --git a/FacilitatorSocket.as b/FacilitatorSocket.as deleted file mode 100644 index 70325c1..0000000 --- a/FacilitatorSocket.as +++ /dev/null @@ -1,100 +0,0 @@ -package -{ - import flash.events.Event; - import flash.events.EventDispatcher; - import flash.events.HTTPStatusEvent; - import flash.events.IOErrorEvent; - import flash.events.SecurityErrorEvent; - import flash.net.URLLoader; - import flash.net.URLLoaderDataFormat; - import flash.net.URLRequest; - import flash.net.URLRequestMethod; - import flash.net.URLVariables; - - import events.FacilitatorSocketEvent; - - [Event(name=FacilitatorSocketEvent.CONNECT_FAILED, type="com.flashproxy.rtmfp.events.FacilitatorSocketEvent")] - [Event(name=FacilitatorSocketEvent.REGISTRATION_FAILED, type="com.flashproxy.rtmfp.events.FacilitatorSocketEvent")] - [Event(name=FacilitatorSocketEvent.REGISTRATION_RECEIVED, type="com.flashproxy.rtmfp.events.FacilitatorSocketEvent")] - [Event(name=FacilitatorSocketEvent.REGISTRATIONS_EMPTY, type="com.flashproxy.rtmfp.events.FacilitatorSocketEvent")] - public class FacilitatorSocket extends EventDispatcher - { - private var host:String; - private var port:uint; - - public function FacilitatorSocket(host:String, port:uint) - { - this.host = host; - this.port = port; - } - - public function get_registration():void - { - make_request(URLRequestMethod.GET); - } - - public function post_registration(registration_data:String):void - { - var data:URLVariables = new URLVariables(); - data.client = registration_data; - make_request(URLRequestMethod.POST, data); - } - - private function fail():void - { - dispatchEvent(new FacilitatorSocketEvent(FacilitatorSocketEvent.CONNECT_FAILED)); - } - - private function make_request(method:String, data:URLVariables = null):void - { - var request:URLRequest; - var loader:URLLoader; - - loader = new URLLoader(); - /* Get the x-www-form-encoded-values. */ - loader.dataFormat = URLLoaderDataFormat.VARIABLES; - loader.addEventListener(Event.COMPLETE, on_complete_event); - loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, on_security_error_event); - loader.addEventListener(IOErrorEvent.IO_ERROR, on_io_error_event); - - request = new URLRequest(url); - request.data = data; - request.method = method; - loader.load(request); - } - - private function on_complete_event(event:Event):void - { - try { - var client_id:String = event.target.data.client; - var relay_addr:String = event.target.data.relay; - if (client_id == "") { - dispatchEvent(new FacilitatorSocketEvent(FacilitatorSocketEvent.REGISTRATIONS_EMPTY)); - } else { - dispatchEvent(new FacilitatorSocketEvent(FacilitatorSocketEvent.REGISTRATION_RECEIVED, client_id, relay_addr)); - } - } catch (e:Error) { - /* error is thrown for POST when we don't care about - the response anyways */ - } - - event.target.close() - } - - private function on_io_error_event(event:IOErrorEvent):void - { - fail(); - } - - private function on_security_error_event(event:SecurityErrorEvent):void - { - fail(); - } - - private function get url():String - { - return "http://" + encodeURIComponent(host) - + ":" + encodeURIComponent(port.toString()) + "/"; - } - } -} diff --git a/RTMFPProxyPair.as b/RTMFPProxyPair.as deleted file mode 100644 index 346d63c..0000000 --- a/RTMFPProxyPair.as +++ /dev/null @@ -1,101 +0,0 @@ -package -{ - import flash.events.Event; - import flash.events.EventDispatcher; - import flash.events.ProgressEvent; - import flash.net.Socket; - import flash.utils.ByteArray; - - import rtmfp.CirrusSocket; - import rtmfp.RTMFPSocket; - import rtmfp.events.RTMFPSocketEvent; - - public class RTMFPProxyPair extends ProxyPair - { - private var cirrus_socket:CirrusSocket; - private var client_socket:RTMFPSocket; - private var listen_stream:String; - - public function RTMFPProxyPair(ui:swfcat, cirrus_socket:CirrusSocket, listen_stream:String) - { - super(this, ui); - - log("Starting RTMFP proxy pair on stream " + listen_stream); - - this.cirrus_socket = cirrus_socket; - this.listen_stream = listen_stream; - - setup_client_socket(); - } - - override public function set client(client_addr:Object):void - { - this.client_addr = client_addr; - log("Client: connecting to " + client_addr.peer + " on stream " + client_addr.stream + "."); - client_socket.connect(client_addr.peer, client_addr.stream); - } - - 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; - RTMFPSocket(src).readBytes(bytes, 0, num_bytes); - log("RTMFPProxyPair: read " + num_bytes + " bytes from client, writing to relay."); - Socket(dst).writeBytes(bytes); - } - - if (dst == null) { - dst = client_socket; - Socket(src).readBytes(bytes, 0, num_bytes); - log("RTMFPProxyPair: read " + num_bytes + " bytes from relay, writing to client."); - RTMFPSocket(dst).writeBytes(bytes); - } - } - - private function setup_client_socket():void - { - client_socket = new RTMFPSocket(cirrus_socket); - client_socket.addEventListener(RTMFPSocketEvent.CONNECT_FAILED, function (e:RTMFPSocketEvent):void { - log("Client: connection failed to " + client_addr.peer + " on stream " + client_addr.stream + "."); - }); - client_socket.addEventListener(RTMFPSocketEvent.CONNECT_SUCCESS, function (e:RTMFPSocketEvent):void { - log("Client: connected to " + client_addr.peer + " on stream " + client_addr.stream + "."); - if (connected) { - dispatchEvent(new Event(Event.CONNECT)); - } - }); - client_socket.addEventListener(RTMFPSocketEvent.PEER_CONNECTED, function (e:RTMFPSocketEvent):void { - log("Peer connected."); - }); - client_socket.addEventListener(RTMFPSocketEvent.PEER_DISCONNECTED, function (e:RTMFPSocketEvent):void { - log("Client: disconnected from " + client_addr.peer + "."); - close(); - }); - client_socket.addEventListener(RTMFPSocketEvent.PLAY_STARTED, function (e:RTMFPSocketEvent):void { - log("Play started."); - }); - client_socket.addEventListener(RTMFPSocketEvent.PUBLISH_STARTED, function (e:RTMFPSocketEvent):void { - log("Publishing started."); - }); - client_socket.addEventListener(ProgressEvent.SOCKET_DATA, client_to_relay); - - client_socket.listen(listen_stream); - } - } -} \ No newline at end of file diff --git a/TCPProxyPair.as b/TCPProxyPair.as deleted file mode 100644 index de18dd6..0000000 --- a/TCPProxyPair.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 TCPProxyPair extends ProxyPair - { - private var client_socket:Socket; - - public function TCPProxyPair(ui:swfcat) - { - super(this, ui); - - log("Starting TCP 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("TCPProxyPair: 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/events/FacilitatorSocketEvent.as b/events/FacilitatorSocketEvent.as deleted file mode 100644 index 5787309..0000000 --- a/events/FacilitatorSocketEvent.as +++ /dev/null @@ -1,24 +0,0 @@ -package events -{ - import flash.events.Event; - - public class FacilitatorSocketEvent extends Event - { - public static const CONNECT_CLOSED:String = "connectClosed"; - public static const CONNECT_FAILED:String = "connectFailed"; - public static const CONNECT_SUCCESS:String = "connectSuccess"; - public static const REGISTRATION_RECEIVED:String = "registrationReceived"; - public static const REGISTRATION_FAILED:String = "registrationFailed"; - public static const REGISTRATIONS_EMPTY:String = "registrationsEmpty"; - - public var client:String; - public var relay:String; - - public function FacilitatorSocketEvent(type:String, client:String = null, relay:String = null, bubbles:Boolean = false, cancelable:Boolean = false) - { - super(type, bubbles, cancelable); - this.client = client; - this.relay = relay; - } - } -} diff --git a/rtmfp/CirrusSocket.as b/rtmfp/CirrusSocket.as deleted file mode 100644 index 071ac0d..0000000 --- a/rtmfp/CirrusSocket.as +++ /dev/null @@ -1,142 +0,0 @@ -/* CirrusSocket abstraction - * ------------------------ - * Manages the NetConnection portion of RTMFP and also handles - * the handshake between two Flash players to decide what their - * data stream names will be. - * - * TODO: consider using farNonce/nearNonce instead of sending bytes? - */ - -package rtmfp -{ - import flash.events.Event; - import flash.events.EventDispatcher; - import flash.events.IOErrorEvent; - import flash.events.NetStatusEvent; - import flash.events.ProgressEvent; - import flash.events.SecurityErrorEvent; - import flash.net.NetConnection; - import flash.utils.clearInterval; - import flash.utils.setInterval; - - import rtmfp.RTMFPSocket; - import rtmfp.events.CirrusSocketEvent; - import rtmfp.events.RTMFPSocketEvent; - - [Event(name=CirrusSocketEvent.CONNECT_CLOSED, type="com.flashproxy.rtmfp.events.CirrusSocketEvent")] - [Event(name=CirrusSocketEvent.CONNECT_FAILED, type="com.flashproxy.rtmfp.events.CirrusSocketEvent")] - [Event(name=CirrusSocketEvent.CONNECT_SUCCESS, type="com.flashproxy.rtmfp.events.CirrusSocketEvent")] - [Event(name=CirrusSocketEvent.HELLO_RECEIVED, type="com.flashproxy.rtmfp.events.CirrusSocketEvent")] - public class CirrusSocket extends EventDispatcher - { - private static const CONNECT_TIMEOUT:uint = 4000; // in milliseconds - - /* We'll append a unique number to the DATA_STREAM_PREFIX for each - new stream we create so that we have unique streams per player. */ - private static const DATA_STREAM_PREFIX:String = "DATA"; - private var data_stream_suffix:uint = 0; - - /* Connection to the Cirrus rendezvous service */ - public var connection:NetConnection; - - /* Timeouts */ - private var connect_timeout:int; - private var hello_timeout:int; - - public function CirrusSocket() - { - connection = new NetConnection(); - connection.addEventListener(NetStatusEvent.NET_STATUS, on_net_status_event); - connection.addEventListener(IOErrorEvent.IO_ERROR, on_io_error_event); - connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, on_security_error_event); - - /* Set up a client object to handle the hello callback */ - var client:Object = new Object(); - client.onRelay = on_hello; - connection.client = client; - } - - public function connect(addr:String, key:String):void - { - if (!this.connected) { - connect_timeout = setInterval(fail, CONNECT_TIMEOUT); - connection.connect(addr, key); - } else { - throw new Error("Cannot connect Cirrus socket: already connected."); - } - } - - public function close():void - { - if (this.connected) { - connection.close(); - } else { - throw new Error("Cannot close Cirrus socket: not connected."); - } - } - - public function get connected():Boolean - { - return (connection != null && connection.connected); - } - - public function get id():String - { - if (this.connected) { - return connection.nearID; - } - - return null; - } - - public function get local_stream_name():String - { - return DATA_STREAM_PREFIX + data_stream_suffix; - } - - /* Sends a hello message to the Flash player with Cirrus ID "id" - We use this new call protocol outlined here: - http://forums.adobe.com/thread/780788?tstart=0 */ - public function send_hello(id:String):void - { - if (this.connected) { - connection.call("relay", null, id, local_stream_name); - } else { - throw new Error("Cannot send hello: Cirrus socket not connected."); - } - } - -/*************************** PRIVATE HELPER FUNCTIONS *************************/ - - private function fail():void - { - clearInterval(connect_timeout); - dispatchEvent(new CirrusSocketEvent(CirrusSocketEvent.CONNECT_FAILED)); - } - - private function on_hello(peer:String, ...args):void - { - var stream:String = args[0]; - dispatchEvent(new CirrusSocketEvent(CirrusSocketEvent.HELLO_RECEIVED, peer, stream)); - data_stream_suffix++; - } - - private function on_io_error_event(event:IOErrorEvent):void - { - fail(); - } - - private function on_net_status_event(event:NetStatusEvent):void - { - if (event.info.code == "NetConnection.Connect.Success") { - clearInterval(connect_timeout); - dispatchEvent(new CirrusSocketEvent(CirrusSocketEvent.CONNECT_SUCCESS)); - } - } - - private function on_security_error_event(event:SecurityErrorEvent):void - { - fail(); - } - } -} diff --git a/rtmfp/RTMFPSocket.as b/rtmfp/RTMFPSocket.as deleted file mode 100644 index 4efe702..0000000 --- a/rtmfp/RTMFPSocket.as +++ /dev/null @@ -1,202 +0,0 @@ -package rtmfp -{ - import flash.events.Event; - import flash.events.EventDispatcher; - import flash.events.IOErrorEvent; - import flash.events.NetStatusEvent; - import flash.events.ProgressEvent; - import flash.events.SecurityErrorEvent; - import flash.net.NetConnection; - import flash.net.NetStream; - import flash.utils.ByteArray; - import flash.utils.clearTimeout; - import flash.utils.setTimeout; - - import rtmfp.CirrusSocket; - import rtmfp.RTMFPSocketClient; - import rtmfp.events.CirrusSocketEvent; - import rtmfp.events.RTMFPSocketEvent; - - [Event(name=RTMFPSocketEvent.CONNECT_FAILED, type="com.flashproxy.rtmfp.events.RTMFPSocketEvent")] - [Event(name=RTMFPSocketEvent.CONNECT_CLOSED, type="com.flashproxy.rtmfp.events.RTMFPSocketEvent")] - [Event(name=RTMFPSocketEvent.CONNECT_SUCCESS, type="com.flashproxy.rtmfp.events.RTMFPSocketEvent")] - [Event(name=RTMFPSocketEvent.PEER_CONNECTED, type="com.flashproxy.rtmfp.events.RTMFPSocketEvent")] - [Event(name=RTMFPSocketEvent.PEER_DISCONNECTED, type="com.flashproxy.rtmfp.events.RTMFPSocketEvent")] - [Event(name=RTMFPSocketEvent.PLAY_STARTED, type="com.flashproxy.rtmfp.events.RTMFPSocketEvent")] - [Event(name=RTMFPSocketEvent.PUBLISH_STARTED, type="com.flashproxy.rtmfp.events.RTMFPSocketEvent")] - [Event(name=RTMFPSocketEvent.PUBLISH_FAILED, type="com.flashproxy.rtmfp.events.RTMFPSocketEvent")] - public class RTMFPSocket extends EventDispatcher - { - private const CONNECT_TIMEOUT:uint = 10000; - - private var s_c:CirrusSocket; - - private var recv_stream:NetStream; - private var send_stream:NetStream; - - private var peer_stream:NetStream; - - private var connect_timeout:int; - - public function RTMFPSocket(s_c:CirrusSocket) - { - this.s_c = s_c; - recv_stream = null; - send_stream = null; - connect_timeout = 0; - } - - /* Tears down this RTMFPSocket, closing both its streams. - To be used when destroying this object. */ - public function close():void - { - if (send_stream != null) { - s_c.connection.removeEventListener(NetStatusEvent.NET_STATUS, on_stream_disconnection_event); - send_stream.close(); - } - - if (recv_stream != null) { - recv_stream.close(); - } - } - - /* In RTMFP, you connect to a remote socket by requesting to - "play" the data being published on a named stream by the - host identified by id. The connection request goes through - the Cirrus server which handles the mapping from id/stream - to IP/port and any necessary NAT traversal. */ - public function connect(id:String, stream:String):void - { - recv_stream = new NetStream(s_c.connection, id); - var client:RTMFPSocketClient = new RTMFPSocketClient(); - client.addEventListener(ProgressEvent.SOCKET_DATA, on_data_available, false, 0, true); - client.addEventListener(RTMFPSocketClient.CONNECT_ACKNOWLEDGED, on_connect_acknowledged, false, 0, true); - recv_stream.client = client; - recv_stream.addEventListener(NetStatusEvent.NET_STATUS, on_recv_stream_event); - recv_stream.play(stream); - connect_timeout = setTimeout(on_connect_timeout, CONNECT_TIMEOUT, recv_stream); - } - - public function get connected():Boolean - { - return (recv_stream != null && recv_stream.client != null && - RTMFPSocketClient(recv_stream.client).connect_acknowledged); - } - - /* In RTMFP, you open a listening socket by publishing a named - stream that others can connect to instead of listening on a port. - You register this stream with the Cirrus server via the Cirrus - socket so that it can redirect connection requests for an id/stream - tuple to this socket. */ - public function listen(stream:String):void - { - // apparently streams don't get disconnection events, only the NetConnection - // object does...bleh. - s_c.connection.addEventListener(NetStatusEvent.NET_STATUS, on_stream_disconnection_event); - - send_stream = new NetStream(s_c.connection, NetStream.DIRECT_CONNECTIONS); - send_stream.addEventListener(NetStatusEvent.NET_STATUS, on_send_stream_event); - var client:Object = new Object(); - client.onPeerConnect = on_peer_connect; - send_stream.client = client; - send_stream.publish(stream); - } - - public function get peer():String - { - if (!connected) return null; - return recv_stream.farID; - } - - public function get peer_connected():Boolean - { - return send_stream.peerStreams.length > 0; - } - - public function readBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void - { - if (recv_stream != null && recv_stream.client != null) { - recv_stream.client.bytes.readBytes(bytes, offset, length); - } - } - - public function writeBytes(bytes:ByteArray):void - { - if (send_stream != null && peer_connected) { - send_stream.send(RTMFPSocketClient.DATA_AVAILABLE, bytes); - } - } - - /* Listens for acknowledgement of a connection attempt to a - remote peer. */ - private function on_connect_acknowledged(event:Event):void - { - clearTimeout(connect_timeout); - dispatchEvent(new RTMFPSocketEvent(RTMFPSocketEvent.CONNECT_SUCCESS, recv_stream)); - } - - /* If we don't get a connection acknowledgement by the time this - timeout function is called, we punt. */ - private function on_connect_timeout(peer:NetStream):void - { - if (!this.connected) { - dispatchEvent(new RTMFPSocketEvent(RTMFPSocketEvent.CONNECT_FAILED, recv_stream)); - } - } - - private function on_data_available(event:ProgressEvent):void - { - dispatchEvent(event); - } - - private function on_recv_stream_event(event:NetStatusEvent):void - { - /* empty, here for symmetry */ - } - - /* This function gets called whenever someone tries to connect - to this socket's send_stream tuple. We don't want multiple - peers connecting at once, so we disallow that. The socket - acknowledges the connection back to the peer with the - SET_CONNECTION_ACKNOWLEDGED message. */ - private function on_peer_connect(peer:NetStream):Boolean - { - if (peer_connected) { - return false; - } - - peer_stream = peer; - peer.send(RTMFPSocketClient.SET_CONNECT_ACKNOWLEDGED); - - // need to do this in a timeout so that this function can - // return true to finalize the connection before firing the event - setTimeout(function (stream:NetStream):void { - dispatchEvent(new RTMFPSocketEvent(RTMFPSocketEvent.PEER_CONNECTED, stream)); - }, 0, peer); - - return true; - } - - private function on_send_stream_event(event:NetStatusEvent):void - { - switch (event.info.code) { - case "NetStream.Publish.Start": - dispatchEvent(new RTMFPSocketEvent(RTMFPSocketEvent.PUBLISH_STARTED)); - break; - case "NetStream.Publish.BadName": - dispatchEvent(new RTMFPSocketEvent(RTMFPSocketEvent.PUBLISH_FAILED)); - break; - default: - break; - } - } - - private function on_stream_disconnection_event(event:NetStatusEvent):void - { - if (event.info.code == "NetStream.Connect.Closed" && event.info.stream === peer_stream) { - dispatchEvent(new RTMFPSocketEvent(RTMFPSocketEvent.PEER_DISCONNECTED)); - } - } - } -} - diff --git a/rtmfp/RTMFPSocketClient.as b/rtmfp/RTMFPSocketClient.as deleted file mode 100644 index b917bcb..0000000 --- a/rtmfp/RTMFPSocketClient.as +++ /dev/null @@ -1,46 +0,0 @@ -package rtmfp -{ - import flash.events.Event; - import flash.events.EventDispatcher; - import flash.events.ProgressEvent; - import flash.utils.ByteArray; - - [Event(name=RTMFPSocketClient.CONNECT_ACKNOWLEDGED, type="flash.events.Event")] - public dynamic class RTMFPSocketClient extends EventDispatcher { - public static const DATA_AVAILABLE:String = "data_available"; - public static const CONNECT_ACKNOWLEDGED:String = "connectAcknowledged"; - public static const SET_CONNECT_ACKNOWLEDGED:String = "set_connect_acknowledged"; - - private var _bytes:ByteArray; - private var _connect_acknowledged:Boolean; - - public function RTMFPSocketClient() - { - super(); - _bytes = new ByteArray(); - _connect_acknowledged = false; - } - - public function get bytes():ByteArray - { - return _bytes; - } - - public function data_available(bytes:ByteArray):void - { - bytes.readBytes(_bytes, _bytes.length, 0); - dispatchEvent(new ProgressEvent(ProgressEvent.SOCKET_DATA, false, false, _bytes.bytesAvailable, _bytes.bytesAvailable)); - } - - public function get connect_acknowledged():Boolean - { - return _connect_acknowledged; - } - - public function set_connect_acknowledged():void - { - _connect_acknowledged = true; - dispatchEvent(new Event(CONNECT_ACKNOWLEDGED)); - } - } -} diff --git a/rtmfp/events/CirrusSocketEvent.as b/rtmfp/events/CirrusSocketEvent.as deleted file mode 100644 index 831ad73..0000000 --- a/rtmfp/events/CirrusSocketEvent.as +++ /dev/null @@ -1,22 +0,0 @@ -package rtmfp.events -{ - import flash.events.Event; - - public class CirrusSocketEvent extends Event - { - public static const CONNECT_CLOSED:String = "connectClosed"; - public static const CONNECT_FAILED:String = "connectFailed"; - public static const CONNECT_SUCCESS:String = "connectSuccess"; - public static const HELLO_RECEIVED:String = "helloReceived"; - - public var peer:String; - public var stream:String; - - public function CirrusSocketEvent(type:String, peer:String = null, stream:String = null, bubbles:Boolean = false, cancelable:Boolean = false) - { - super(type, bubbles, cancelable); - this.peer = peer; - this.stream = stream; - } - } -} diff --git a/rtmfp/events/RTMFPSocketEvent.as b/rtmfp/events/RTMFPSocketEvent.as deleted file mode 100644 index 87a7e09..0000000 --- a/rtmfp/events/RTMFPSocketEvent.as +++ /dev/null @@ -1,25 +0,0 @@ -package rtmfp.events -{ - import flash.events.Event; - import flash.net.NetStream; - - public class RTMFPSocketEvent extends Event - { - public static const CONNECT_FAILED:String = "connectFailed"; - public static const CONNECT_SUCCESS:String = "connectSuccess"; - public static const CONNECT_CLOSED:String = "connectClosed" - public static const PEER_CONNECTED:String = "peerConnected"; - public static const PEER_DISCONNECTED:String = "peerDisconnected"; - public static const PLAY_STARTED:String = "playStarted"; - public static const PUBLISH_STARTED:String = "publishStarted"; - public static const PUBLISH_FAILED:String = "publishFailed"; - - public var stream:NetStream; - - public function RTMFPSocketEvent(type:String, stream:NetStream = null, bubbles:Boolean = false, cancelable:Boolean = false) - { - super(type, bubbles, cancelable); - this.stream = stream; - } - } -}
tor-commits@lists.torproject.org