Class TcpDeviceBuilderExtensions
Registers device clients that talk TCP, connecting out or listening for the system under test.
public static class TcpDeviceBuilderExtensions
- Inheritance
-
TcpDeviceBuilderExtensions
- Inherited Members
Methods
AddTcpClient(ProtoDeviceBuilder, string, IDeviceFramer?, string?, int?, Func<ProtoExecutionContext, string, string>?, Action<TcpDeviceOptions>?)
Declares a named device client whose devices connect out over TCP. Pass an
address (tcp://host:port, {deviceId} allowed), a
resolveAddress, or, inside AddApplication, a port on the
application's host. framer cuts the stream into frames; without one each frame is
a line of text ending in \n.
public static ProtoDeviceClientBuilder AddTcpClient(this ProtoDeviceBuilder devices, string name, IDeviceFramer? framer = null, string? address = null, int? port = null, Func<ProtoExecutionContext, string, string>? resolveAddress = null, Action<TcpDeviceOptions>? configure = null)
Parameters
devicesProtoDeviceBuildernamestringframerIDeviceFrameraddressstringportint?resolveAddressFunc<ProtoExecutionContext, string, string>configureAction<TcpDeviceOptions>
Returns
AddTcpListener(ProtoDeviceBuilder, string, IDeviceFramer?, string, int, Action<TcpDeviceOptions>?)
Declares a named device client whose devices listen for the system under test to connect. Each
device binds its own port on host (port 0 lets the operating system choose), and
ListenAsync in the device class returns the address to hand the application.
public static ProtoDeviceClientBuilder AddTcpListener(this ProtoDeviceBuilder devices, string name, IDeviceFramer? framer = null, string host = "127.0.0.1", int port = 0, Action<TcpDeviceOptions>? configure = null)
Parameters
devicesProtoDeviceBuildernamestringframerIDeviceFramerhoststringportintconfigureAction<TcpDeviceOptions>