class FakeEndpoint

Defined at line 3453 of file fidling/gen/src/connectivity/network/testing/netemul/network-context/fidl/network/hlcpp/fuchsia/netemul/network/cpp/fidl.h

Fake endpoint can be added to a network to snoop or inject packets.

Public Methods

void ~FakeEndpoint ()
void Write (::std::vector<uint8_t> data, WriteCallback callback)

Writes a frame to the network.

void Read (ReadCallback callback)

Reads a single frame from the network.

Blocks until new data is available to be read. FakeEndpoint will keep a limited amount of

frames to be read, dropping the oldest ones if the data is not fetched fast enough. The

number of dropped frames since the last call to `Read` is returned in `dropped_frames`.

Issuing a second `Read` request when the first one is still pending will cause the channel

to be closed with `ZX_ERR_BAD_STATE`.