Skip to main content

create_test_channels

Function create_test_channels 

Source
pub fn create_test_channels(transport: Transport) -> (Channel, Channel)
Expand description

Creates a pair of channels for testing.

Returns (local, remote) where:

  • When transport is Transport::Fidl, the first element (local) is a FIDL client channel (wraps a ChannelProxy) and the second element (remote) is a FIDL server channel (wraps a ChannelRequestStream).
  • When transport is Transport::Socket, the elements represent a symmetric socket pair and are not distinguished as client or server.