zplCore.comzplCore.com

TcpPrinterConnection

public sealed class TcpPrinterConnection : IPrinterConnection, IAsyncDisposable

Raw TCP (port 9100) connection. Opens one socket per call, like ZplPrinterClient.

Constructors

SignatureDescription
# TcpPrinterConnection(ZplPrinterClient client)
# TcpPrinterConnection(string host, int port = 9100)

Properties

PropertyTypeDescription
Client { get; }ZplPrinterClientThe wrapped client (host, port, timeout, encoding).

Methods

Method SignatureReturnsDescription
# DisposeAsync()ValueTask
# QueryAsync(string command, TimeSpan timeout, CancellationToken ct = default)Task<string>
# SendAsync(byte[] data, CancellationToken ct = default)Task