class WebkitRemote::Event::NetworkData
Emitted when a chunk of data is received over the network.
Attributes
bytes_received[R]
@return [Number] number of bytes actually received
data_length[R]
@return [Number] number of data bytes received (after decompression)
resource[R]
@return [WebkitRemote::Client::NetworkResource] information about the
resource fetched by this network operation
timestamp[R]
@return [Number] the event timestamp
Public Class Methods
new(rpc_event, client)
click to toggle source
@private Use Event#for instead of calling this constructor directly.
Calls superclass method
WebkitRemote::Event::new
# File lib/webkit_remote/client/network_events.rb, line 25 def initialize(rpc_event, client) super @data_length = raw_data['dataLength'] @bytes_received = raw_data['encodedDataLength'] @timestamp = raw_data['timestamp'] @resource = client.network_resource raw_data['requestId'] @resource.add_event self end