//
//  RCWebSocket.h
//  Demo
//
//  Created by 余衡武 on 2024/9/30.
//

#import <UIKit/UIKit.h>
#import "RCWSOrder.h"
#import "RCOperateManager.h"

NS_ASSUME_NONNULL_BEGIN

@interface RCWebSocket : NSObject

///**
// *  执行进程 RCProgress Block
// */
//typedef void (^RCProgress) (int success, int fail);
//
///**
// *  执行结果 RCComplete Block
// */
//typedef void (^RCComplete) (BOOL isComplete);
//
///**
// *  预览图 RCPreview Block
// */
//typedef void (^RCPreview) (int index, UIImage * __nullable image);

/**
 *
 *  超时重连时间，默认1秒
 */
@property (nonatomic, assign) NSTimeInterval overtime;

/**
 *
 *  超时重连次数,默认5次
 */
@property (nonatomic, assign) NSUInteger reconnectCount;


#pragma mark - 单例
+ (RCWebSocket *)shareInstance;

#pragma mark - 发送指令
/// 同步操作 发送指令 （分辨率和DPI）
- (void)sendSyscOrder:(NSString *)order order2:(NSString *)order2 toUrls:(NSArray *)urls progress:(RCProgress)progress complete:(RCComplete)complete;
/// 批量操作 发送指令
- (void)sendOperationOrder:(NSString *)order toUrls:(NSArray *)urls progress:(RCProgress)progress complete:(RCComplete)complete;
/// 预览图操作 发送指令
- (void)sendPreviewOrder:(NSString *)order order2:(NSString *)order2 toUrls:(NSArray *)urls preview:(RCPreview)preview;
/// 停止所有预览图推流
- (void)stopAllConnect;


@end

NS_ASSUME_NONNULL_END
