labs.net.webChannel.WireV8 Extends
The v8 codec class.

Inheritance

Constructor

goog.labs.net.webChannel.WireV8()

Instance Methods

Public Protected Private
decodeMessage(messageText) *
Decodes a standalone message received from the wire. May throw exception if text is ill-formatted. We use eval() to decode as the server may generate JS literals, which don't necessarily comply with the JSON format, such as double quota, null array element. Over time we will phase out servers that don't generate JSON formatted messages.
Arguments:
messageText : string
The string content as received from the wire.
Returns: *  The decoded message object.
code »
encodeMessage(messagebufferopt_prefix)
Encodes a standalone message into the wire format. May throw exception if the message object contains any invalid elements.
Arguments:
message : !Object | !goog.structs.Map
The message data. V8 only support JS objects (or Map).
buffer : !Array.<string>
The text buffer to write the message to.
opt_prefix : string=
The prefix for each field of the object.
code »
encodeMessageQueue(messageQueuecountbadMapHandler)
Encodes all the buffered messages of the forward channel.
Arguments:
messageQueue : !Array.<Wire.QueuedMap>
The message data. V8 only support JS objects.
count : number
The number of messages to be encoded.
badMapHandler : ?function(!Object)
Callback for bad messages.
code »

Instance Properties

Parser for a response payload. The parser should return an array.
Code »

Package labs.net.webChannel

Package Reference