13#import <Foundation/Foundation.h>
14#import <UniPRT/AComm.h>
26#define DEFAULT_DATA_PORT 9100
38#define DEFAULT_MGMT_PORT 3007
83#define DEFAULT_STATUS_PORT 3002
114@property (nonatomic, readonly) NSInputStream *inputStream;
126@property (nonatomic, readonly) NSOutputStream *outputStream;
164- (instancetype)initWithIPAddress:(NSString *)ipAddress port:(NSUInteger)port;
206- (void)write:(NSData *)text;
248- (NSString *)descriptorUseIp:(NSString *)ip descriptorUsePort:(NSString *)port;
278- (NSData *)writeAndWaitForResponse:(NSData *)text
279 responseStartTimeOut:(NSTimeInterval)responseStartTimeOut
280 responseEndTimeOut:(NSTimeInterval)responseEndTimeOut
281 completionToken:(NSString *)completionToken;
311- (NSData *)writeAndWaitForResponseJson:(NSData *)text
312 responseStartTimeOut:(NSTimeInterval)responseStartTimeOut
313 responseEndTimeOut:(NSTimeInterval)responseEndTimeOut
314 completionToken:(NSString *)completionToken;
380typedef NS_ENUM(NSInteger, DescriptorPortType) {
381 DescriptorPortTypeData,
382 DescriptorPortTypeMGMT,
383 DescriptorPortTypeStatus,
406- (void)connectionSettingsWithIP:(NSString *)ip port:(NSUInteger)port;
431- (NSString *)validateDescriptor:(NSString *)descriptorHint withPortType:(DescriptorPortType)portTypeHint;
452- (void)sendPrintFile:(NSString *)ipAddress fileName:(NSString *)fileName;
473- (void)sendPrintString:(NSString *)ipAddress data:(NSData *)data;
491- (void)writePrinterFile:(NSString *)fileName;
A base class for communication interfaces, conforming to the IComm protocol.
Definition AComm.h:29
A class for TCP communication, inheriting from AComm and conforming to the NSStreamDelegate protocol.
Definition TcpComm.h:101
void close()
Closes the connection to the TCP server.
BOOL connected
A flag indicating whether the connection is established.
Definition TcpComm.h:140
typedef NS_ENUM(NSInteger, DescriptorPortType)
Types of descriptor ports.
Definition TcpComm.h:380
void open()
Opens the connection to the TCP server.
NSData * read()
Reads data from the TCP server.