zplCore.comzplCore.com
interface2 members

IPrinterConnection

public interface IPrinterConnection : IAsyncDisposable

A bidirectional (where supported) raw connection to a label printer.

Methods

Method SignatureReturnsDescription
# QueryAsync(string command, TimeSpan timeout, CancellationToken ct = default)Task<string>Sends a query command (e.g. "~HS") and returns the response, or null when the transport is write-only or nothing arrived in time.
# SendAsync(byte[] data, CancellationToken ct = default)TaskSends raw bytes (ZPL, EPL, graphics) to the printer.