This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import zmq | |
from time import sleep, time | |
import numpy as np | |
import sys | |
sys.path.append('E:\SachsLab\Tools\VR\Pupil\pupil') | |
import pupil_src.shared_modules.file_methods as fm | |
from pupil_src.shared_modules import zmq_tools | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "AsyncURLConnection.h" | |
@implementation AsyncURLConnection | |
+ (id)request:(NSString *)requestUrl completeBlock:(completeBlock_t)completeBlock errorBlock:(errorBlock_t)errorBlock | |
{ | |
return [[[self alloc] initWithRequest:requestUrl | |
completeBlock:completeBlock errorBlock:errorBlock] autorelease]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
typedef void (^completeBlock_t)(NSData *data); | |
typedef void (^errorBlock_t)(NSError *error); | |
@interface AsyncURLConnection : NSURLConnection | |
{ | |
NSMutableData *data_; | |
completeBlock_t completeBlock_; | |
errorBlock_t errorBlock_; |