1.SocketIOHandler.h
#import <Foundation/Foundation.h>
@interface SocketIOHandler : NSObject
+(SocketIOHandler*)shareInstance;
- (void)connect;
- (void)disconnect;
- (NSUUID * _Nonnull)on:(NSString * _Nonnull)event callback:(void (^ _Nonnull)(NSArray * _Nonnull data))callback;
- (void)emitWithAck:(NSString * _Nonnull)event with:(NSArray * _Nonnull)items callback:(void (^ _Nonnull)(NSArray * _Nonnull data))callback;
- (void)removeAllHandlers;
@property(nonatomic,assign)BOOL isNotConnected;
@property(nonatomic,assign)BOOL isDisConnected;
@end
2.SocketIOHandler.m
#import "SocketIOHandler.h"
#import "Bitasset-Swift.h"
@interface SocketIOHandler()
{
SocketIOClient* socket;//socket
}
@end
@implementation SocketIOHandler
+ (SocketIOHandler *)shareInstance{
static SocketIOHandler * userModel &