Packagecom.adobe.net.proxies
Classpublic class RFC2817Socket
InheritanceRFC2817Socket Inheritance flash.net.Socket
SubclassesSocketHelper

This class allows TCP socket connections through HTTP proxies in accordance with RFC 2817: ftp://ftp.rfc-editor.org/in-notes/rfc2817.txt It can also be used to make direct connections to a destination, as well. If you pass the host and port into the constructor, no proxy will be used. You can also call connect, passing in the host and the port, and if you didn't set the proxy info, a direct connection will be made. A proxy is only used after you have called the setProxyInfo function. The connection to and negotiation with the proxy is completely hidden. All the same events are thrown whether you are using a proxy or not, and the data you receive from the target server will look exact as it would if you were connected to it directly rather than through a proxy.



Public Methods
 MethodDefined by
  
RFC2817Socket(host:String = null, port:int = 0)
Construct a new RFC2817Socket object.
RFC2817Socket
  
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0.0, useWeakReference:Boolean = false):void
RFC2817Socket
  
connect(host:String, port:int):void
Connect to the specified host over the specified port.
RFC2817Socket
  
setProxyInfo(host:String, port:int):void
Set the proxy host and port number.
RFC2817Socket
Constructor detail
RFC2817Socket()constructor
public function RFC2817Socket(host:String = null, port:int = 0)

Construct a new RFC2817Socket object. If you pass in the host and the port, no proxy will be used. If you want to use a proxy, instantiate with no arguments, call setProxyInfo, then call connect.

Parameters
host:String (default = null)
 
port:int (default = 0)
Method detail
addEventListener()method
public override function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0.0, useWeakReference:Boolean = false):voidParameters
type:String
 
listener:Function
 
useCapture:Boolean (default = false)
 
priority:int (default = 0.0)
 
useWeakReference:Boolean (default = false)
connect()method 
public override function connect(host:String, port:int):void

Connect to the specified host over the specified port. If you want your connection proxied, call the setProxyInfo function first.

Parameters
host:String
 
port:int
setProxyInfo()method 
public function setProxyInfo(host:String, port:int):void

Set the proxy host and port number. Your connection will only proxied if this function has been called.

Parameters
host:String
 
port:int