Skip to main content

create_test_channels_with_max_tx

Function create_test_channels_with_max_tx 

Source
pub fn create_test_channels_with_max_tx(
    transport: Transport,
    max_tx_size: usize,
) -> (Channel, Channel)
Expand description

Creates a pair of channels for testing, specifying the maximum TX size.

Returns (local, remote) where:

  • When transport is Transport::Fidl, the first element (local) is a FIDL client channel (wraps a ChannelProxy) and is typically used as the “local” channel by the component under test.
  • The second element (remote) is a FIDL server channel (wraps a ChannelRequestStream) and is typically used as the “remote” channel in unit tests to simulate the remote peer.
  • When transport is Transport::Socket, the elements represent a symmetric socket pair and are not distinguished as client or server.