load_trace


Description:

public void load_trace (File trace_file, Cancellable? cancellable = null) throws Error

Synchronously loads the given trace_file of network messages, ready to simulate a network conversation by matching requests against the file and returning the associated responses.

Call run to start the mock server afterwards.

Loading the trace file may be cancelled from another thread using cancellable.

On error, throws will be set and the state of the Server will not change. A GIOError will be set if there is a problem reading the trace file.

Parameters:

this

a Server

trace_file

trace file to load

cancellable

a Cancellable, or null