namespace Sick.Tim781s.Colab.Interfaces;
///
/// Interface for TCP client communication
///
public interface ITcpClient
{
///
/// Gets the server IP address
///
string ServerIp { get; }
///
/// Gets the server port
///
ushort ServerPort { get; }
///
/// Gets whether the client is connected
///
bool IsConnected { get; }
///
/// Connects to the server
///
/// Connection timeout in milliseconds
void Connect(int timeoutMs = 5000);
///
/// Disconnects from the server
///
void Disconnect();
///
/// Sends data to the server
///
/// Data to send
void Send(ReadOnlyMemory data);
///
/// Receives data from the server
///
/// Receive timeout in milliseconds
/// Received data
byte[] Receive(int timeoutMs = 5000);
}