JMWifi.h

Introduction

Use the links in the table of contents to the left to access the documentation.



Classes

NS_CLASS_AVAILABLE_IOS

无线 Wifi 通讯



Methods

+connectWithHost:port:formRecovery:complete:
+scanWithDiscover:
+shareWifi

connectWithHost:port:formRecovery:complete:


- (void)connectWithHost:(nonnull NSString *)ip port:(uint16_t)port 
        formRecovery:(BOOL)formRecovery complete:(nullable JMComplete)complete;  
Parameters
ip

打印机IP

port

打印机端口号

formRecovery

是否使用防丢单协议

complete

连接完成回调

Discussion

连接打印机


scanWithDiscover:


- (void)scanWithDiscover:(nullable JMDiscoverWifi)discover;  
Parameters
discover

发现打印机回调

Discussion

扫描打印机


shareWifi


+ (nonnull JMWifi *)shareWifi;  
Return Value

JMWifi 单例对象

Discussion

单例


Properties

ip

设备端 IP -connectWithHost:port:defendLose:complete: 中设置值,在下一次设置值前,其值不变

port

设备端口号 -connectWithHost:port:defendLose:complete: 中设置值,在下一次设置值前,其值不变


ip


设备端 IP -connectWithHost:port:defendLose:complete: 中设置值,在下一次设置值前,其值不变

@property (nonatomic,
    copy,
    readonly,
    nullable) NSString *ip;  

port


设备端口号 -connectWithHost:port:defendLose:complete: 中设置值,在下一次设置值前,其值不变

@property (nonatomic,
    assign,
    readonly) uint16_t port;  

Macro Definitions

SINGLETONWIFI

SINGLETONWIFI


#define SINGLETONWIFI [JMWifi shareWifi] 
Discussion

Wifi 单例对象