function DebuggerTransport(aInput, aOutput)
{
  this._input = aInput;
  this._output = aOutput;

  this._converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"]
    .createInstance(Ci.nsIScriptableUnicodeConverter);
  this._converter.charset = "UTF-8";

  this._outgoing = "";
  this._incoming = "";

  this.hooks = null;
}
/**
 * An adapter that handles data transfers between the debugger client and
 * server. It can work with both nsIPipe and nsIServerSocket transports so
 * long as the properly created input and output streams are specified.
 *
 * @param aInput nsIInputStream
 *        The input stream.
 * @param aOutput nsIOutputStream
 *        The output stream.
 *
 * Given a DebuggerTransport instance dt:
 * 1) Set dt.hooks to a packet handler object (described below).
 * 2) Call dt.ready() to begin watching for input packets.
 * 3) Send packets as you please, and handle incoming packets passed to 
 *    hook.onPacket.
 * 4) Call dt.close() to close the connection, and disengage from the event
 *    loop.
 *
 * A packet handler object is an object with two methods:
 *
 * - onPacket(packet) - called when we have received a complete packet.
 *   |Packet| is the parsed form of the packet --- a JavaScript value, not
 *   a JSON-syntax string.
 *
 * - onClosed(status) - called when the connection is closed. |Status| is
 *   an nsresult, of the sort passed to nsIRequestObserver.
 * 
 * Data is transferred as a JSON packet serialized into a string, with the
 * string length prepended to the packet, followed by a colon
 * ([length]:[packet]). The contents of the JSON packet are specified in
 * the Remote Debugging Protocol specification.
 */
An adapter that handles data transfers between the debugger client and
server. It can work with both nsIPipe and nsIServerSocket transports so
long as the properly created input and output streams are specified.

@param aInput nsIInputStream
The input stream.
@param aOutput nsIOutputStream
The output stream.

Given a DebuggerTransport instance dt:
1) Set dt.hooks to a packet handler object (described below).
2) Call dt.ready() to begin watching for input packets.
3) Send packets as you please, and handle incoming packets passed to
hook.onPacket.
4) Call dt.close() to close the connection, and disengage from the event
loop.

A packet handler object is an object with two methods.

- onPacket(packet) - called when we have received a complete packet.
|Packet| is the parsed form of the packet --- a JavaScript value, not
a JSON-syntax string.

- onClosed(status) - called when the connection is closed. |Status| is
an nsresult, of the sort passed to nsIRequestObserver.

Data is transferred as a JSON packet serialized into a string, with the
string length prepended to the packet, followed by a colon
([length]:[packet]). The contents of the JSON packet are specified in
the Remote Debugging Protocol specification.
An adapter that handles data transfers between the debugger client and server . It can work with both nsIPipe and nsIServerSocket transports so long as the properly created input and output streams are specified . @param aInput nsIInputStream The input stream . @param aOutput nsIOutputStream The output stream . Given a DebuggerTransport instance dt : 1 ) Set dt . hooks to a packet handler object ( described below ) . 2 ) Call dt . ready () to begin watching for input packets . 3 ) Send packets as you please and handle incoming packets passed to hook . onPacket . 4 ) Call dt . close () to close the connection and disengage from the event loop . A packet handler object is an object with two methods . - onPacket ( packet ) - called when we have received a complete packet . |Packet| is the parsed form of the packet --- a JavaScript value not a JSON - syntax string . - onClosed ( status ) - called when the connection is closed . |Status| is an nsresult of the sort passed to nsIRequestObserver . Data is transferred as a JSON packet serialized into a string with the string length prepended to the packet followed by a colon ( [ length ] : [ packet ] ) . The contents of the JSON packet are specified in the Remote Debugging Protocol specification .
function DebuggerTransport(aInput, aOutput)
{
  this._input = aInput;
  this._output = aOutput;
  this._converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"]
    .createInstance(Ci.nsIScriptableUnicodeConverter);
  this._converter.charset = "UTF-8";
  this._outgoing = "";
  this._incoming = "";
  this.hooks = null;
}
function DebuggerTransport ( aInput , aOutput ) { this . _input = aInput ; this . _output = aOutput ; this . _converter = Cc [ "@mozilla.org/intl/scriptableunicodeconverter" ] . createInstance ( Ci . nsIScriptableUnicodeConverter ) ; this . _converter . charset = "UTF-8" ; this . _outgoing = "" ; this . _incoming = "" ; this . hooks = null ; }
An adapter that handles data transfers between the debugger client and
 server.
An adapter that handles data transfers between the debugger client and server .