add doric dev vc

This commit is contained in:
王劲鹏
2020-02-26 14:51:02 +08:00
committed by osborn
parent 3766c603ba
commit f9f48d9c8a
10 changed files with 135 additions and 11 deletions

View File

@@ -25,7 +25,7 @@
#import "DoricJSRemoteArgType.h"
#import "NSString+JsonString.h"
static NSString * const kUrlStr = @"ws://192.168.24.240:2080";
static NSString *debuggerAddress = @"";
typedef id (^Block0)(void);
typedef id (^Block1)(id arg0);
@@ -182,6 +182,10 @@ - (NSDictionary *)dicForArg:(id)arg {
return dic;
}
+ (void)configIp:(NSString *)ip {
debuggerAddress = [[@"ws://" stringByAppendingString:ip] stringByAppendingString:@":2080"];
}
- (void)close {
[self.srWebSocket close];
}
@@ -189,7 +193,7 @@ - (void)close {
#pragma mark - Properties
- (SRWebSocket *)srWebSocket {
if (!_srWebSocket) {
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:kUrlStr] cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData timeoutInterval:10];
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:debuggerAddress] cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData timeoutInterval:10];
_srWebSocket = [[SRWebSocket alloc] initWithURLRequest:request];
_srWebSocket.delegate = self;
[_srWebSocket open];