This protocol describes service extensions that are made available through the Dart core libraries, but are not part of the core Dart VM Service Protocol. Service extension methods are invoked by prepending the service extension name (e.g., “ext.dart.libraryName”) to the RPC to be invoked. For example, the getSocketProfile
RPC exposed through dart:io can be executed by invoking ext.dart.io.getSocketProfile
.
This section describes version 1.1 of the dart:io service protocol extensions.
Version getVersion(string isolateId)
The getVersion RPC returns the available version of the dart:io service protocol extensions.
See Version.
Success startSocketProfiling(string isolateId)
Start profiling new socket connections. Statistics for sockets created before profiling was enabled will not be recorded.
See Success.
Success pauseSocketProfiling(string isolateId)
Pause recording socket statistics. clearSocketProfile must be called in order for collected statistics to be cleared.
See Success.
Success clearSocketProfile(string isolateId)
Removes all statistics associated with prior and current sockets.
See Success.
SocketProfile getSocketProfile(string isolateId)
The getSocketProfile RPC is used to retrieve socket statistics collected by the socket profiler. Only samples collected after the initial startSocketProfiling or the last call to clearSocketProfile will be reported.
HttpTimelineLoggingState getHttpEnableTimelineLogging(string isolateId)
The getHttpEnableTimelineLogging RPC is used to remotely inspect the value of HttpClient.enableTimelineLogging
, which determines if HTTP client requests should be logged to the timeline.
Success setHttpEnableTimelineLogging(string isolateId, bool enable)
The setHttpEnableTimelineLogging RPC is used to remotely set the value of HttpClient.enableTimelineLogging
, which determines if HTTP client requests should be logged to the timeline. Note: this will only change the state of HTTP timeline logging for the isolate specified by isolateId
.
See Success.
class Response { // Every response returned by the VM Service has the // type property. This allows the client distinguish // between different kinds of responses. string type; }
class SocketProfile extends Response { // List of socket statistics SocketStatistic[] sockets; }
A SocketProfile provides information about statistics of sockets. See getSocketProfile and SocketStatistic.
class SocketStatistic { // The unique ID associated with this socket. int id; // The time, in microseconds, that this socket was created. int startTime; // The time, in microseconds, that this socket was closed. int endTime [optional]; // The time, in microseconds, that this socket was last read from. int lastReadTime [optional]; // The time, in microseconds, that this socket was last written to. int lastWriteTime [optional]; // The address of socket. string address; // The port of socket. int port; // The type of socket. The value is `tcp` or `udp`. string socketType; // The number of bytes read from this socket. int readBytes; // The number of bytes written to this socket. int writeBytes; }
See SocketProfile and getSocketProfile.
class Success extends Response { }
The Success type is used to indicate that an operation completed successfully.
class Version extends Response { // The major version number is incremented when the protocol is changed // in a potentially incompatible way. int major; // The minor version number is incremented when the protocol is changed // in a backwards compatible way. int minor; }
version | comments |
---|---|
1.0 | Initial revision. |
1.1 | Added lastReadTime and lastWriteTime properties to SocketStatistic . |