ifish/Ifish/controllers/leftcontrollers/IFishHotpotUDPHelper.h

36 lines
934 B
Objective-C

//
// IfishUDPBroadCastHelper.h
// Ifish
//
// Created by imac on 16/9/12.
// Copyright © 2016年 lianxiang. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "AsyncUdpSocket.h"
#import "GCDAsyncUdpSocket.h"
#import "IFishUDPHelperBackMsgModel.h"
@protocol IFishHotpotUDPHelperDelegate<NSObject>
@optional
- (void)udpHelperMessage:(NSString *)msg;
- (void)udpHelperCommandExecutedSuccess:(IFishUDPHelperBackMsgModel *)backModel;
@end
@interface IFishHotpotUDPHelper : NSObject <AsyncUdpSocketDelegate,GCDAsyncUdpSocketDelegate>
@property (nonatomic, strong) GCDAsyncUdpSocket *clientSocket;
+ (IFishHotpotUDPHelper *)sharedInstance;
@property (nonatomic, weak) id<IFishHotpotUDPHelperDelegate> delegate;
- (void)broadCastHotspotConnectCommandWith:(NSString *)ssidName pwd:(NSString *)pwd;
- (void)broadCastRestartCommand;
- (void)broadCastRestCommand;
-(void)closeComplete:(void(^)(void))block;
@end