using Sick.SafetyScanners.DataStructures; using Sick.SafetyScanners.Types; namespace Sick.SafetyScanners.Interfaces; /// /// Interface cho TCP client communication /// public interface ITcpClient : IDisposable { /// /// Server IP address /// IpAddress ServerIp { get; } /// /// Server port /// Port ServerPort { get; } /// /// Indicates whether the TCP socket is currently connected /// bool IsConnected { get; } /// /// Establishes a connection to the sensor /// /// Timeout for connection void Connect(TimeDuration? timeout = null); /// /// Disconnects from the sensor /// void Disconnect(); /// /// Sends data to the sensor /// /// Data to send void Send(ReadOnlyMemory data); /// /// Receives data from the sensor /// /// Timeout for receive operation /// Received packet buffer PacketBuffer Receive(TimeDuration? timeout = null); }