commit 7a302499ef39988d560790a220d4f05f5f1b2e9b Author: Nate Hardison nate@rescomp-09-154551.stanford.edu Date: Thu Jun 2 04:02:36 2011 -0700
Adding some comments and removing clutter --- rtmfp/CirrusSocket.as | 2 ++ rtmfp/RTMFPSocket.as | 17 +---------------- 2 files changed, 3 insertions(+), 16 deletions(-)
diff --git a/rtmfp/CirrusSocket.as b/rtmfp/CirrusSocket.as index d9996f2..9e97c7d 100644 --- a/rtmfp/CirrusSocket.as +++ b/rtmfp/CirrusSocket.as @@ -49,6 +49,8 @@ package rtmfp 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; diff --git a/rtmfp/RTMFPSocket.as b/rtmfp/RTMFPSocket.as index 783a0e0..6e9a45e 100644 --- a/rtmfp/RTMFPSocket.as +++ b/rtmfp/RTMFPSocket.as @@ -45,8 +45,7 @@ package rtmfp }
/* Tears down this RTMFPSocket, closing both its streams. - To be used when destroying this object. If you just want - to disconnect from a client, call disconnect() below */ + To be used when destroying this object. */ public function close():void { if (send_stream != null) { @@ -82,19 +81,6 @@ package rtmfp RTMFPSocketClient(recv_stream.client).connect_acknowledged); }
- public function disconnect():void - { - if (recv_stream != null) { - if (recv_stream.client != null) { - recv_stream.client.removeEventListener(ProgressEvent.SOCKET_DATA, on_data_available); - recv_stream.client.removeEventListener(RTMFPSocketClient.CONNECT_ACKNOWLEDGED, on_connect_acknowledged); - } - recv_stream.removeEventListener(NetStatusEvent.NET_STATUS, on_recv_stream_event); - recv_stream.close(); - recv_stream = null; - } - } - /* 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 @@ -132,7 +118,6 @@ package rtmfp } }
- public function writeBytes(bytes:ByteArray):void { if (send_stream != null && peer_connected) {
tor-commits@lists.torproject.org