UniPRT SDK v1.0.0.0
 
载入中...
搜索中...
未找到
JsonConnection.h
1//
2// JsonConnection.h
3// TSCPrinters SDK
4//
5// Created by Realbuber on 2024/4/8.
6//
7
8#ifndef JsonConnection_h
9#define JsonConnection_h
10
11
12#endif /* JsonConnection_h */
13
14#import <Foundation/Foundation.h>
15#import <UniPRT/TcpComm.h>
16#import <UniPRT/JsonComm.h>
17
18
26@interface JsonConnection : NSObject {
27 NSInteger _userCount;
28 NSString *_descriptor;
29 TcpComm *_tcpComm;
30 JsonComm *_jsonComm;
31 BOOL _disposed;
32}
33
40- (instancetype)initWithCommDescriptor:(NSString *)commDescriptor;
41
47- (NSInteger)addUser;
48
54- (NSInteger)removeUser;
55
61- (NSInteger)getUserCount;
62
68- (NSString *)getDescriptor;
69
73- (void)dispose;
74
80- (TcpComm *)getPtrComm;
81
87- (JsonComm *)getJsonComm;
88
89@end
90
一个用于 TCP 通信的类,继承自 AComm 并符合 NSStreamDelegate 协议。
Definition TcpComm.h:101