Interface ITransport
- Namespace
- CommandStation.Transport
- Assembly
- CommandStation.Abstractions.dll
A protocol-agnostic byte pipe to a command station. Implementations may use any medium (UDP, TCP, serial, …) and deliver received bytes in arbitrary chunk sizes.
public interface ITransport
Properties
IsConnected
bool IsConnected { get; }
Property Value
Methods
ConnectAsync()
Opens the underlying connection and begins receiving.
Task ConnectAsync()
Returns
DisconnectAsync()
Closes the underlying connection.
Task DisconnectAsync()
Returns
SendAsync(ReadOnlyMemory<byte>)
Sends the given bytes to the command station.
Task SendAsync(ReadOnlyMemory<byte> data)
Parameters
dataReadOnlyMemory<byte>
Returns
Events
OnBytesReceived
event EventHandler<BytesReceivedEventArgs>? OnBytesReceived
Event Type
OnConnectionChanged
event EventHandler<ConnectionChangedEventArgs>? OnConnectionChanged