26 lines
755 B
Objective-C
26 lines
755 B
Objective-C
//
|
|
// GiGaSocketRocketUtility.h
|
|
// LXAnimationTest
|
|
//
|
|
// Created by lianxiang on 2018/8/17.
|
|
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
|
//
|
|
|
|
#import <Foundation/Foundation.h>
|
|
#import "SocketRocket.h"
|
|
extern NSString * const kNeedPayOrderNote;
|
|
extern NSString * const kWebSocketDidOpenNote;
|
|
extern NSString * const kWebSocketDidCloseNote;
|
|
extern NSString * const kWebSocketdidReceiveMessageNote;
|
|
|
|
@interface GiGaSocketRocketUtility : NSObject
|
|
// 获取连接状态
|
|
@property (nonatomic,assign,readonly) SRReadyState socketReadyState;
|
|
|
|
+ (GiGaSocketRocketUtility *)shareInstance;
|
|
-(void)srWebSocketOpenWithURLString:(NSString *)urlString;//开启连接
|
|
-(void)srWebSocketClose;//关闭连接
|
|
- (void)sendData:(id)data;//发送数据
|
|
|
|
@end
|