project_files/HedgewarsMobile/Classes/EngineProtocolNetwork.m
changeset 6337 84e7d1a5e3df
parent 6321 5a0416e5a6de
child 6353 d8f62c805619
equal deleted inserted replaced
6335:f753b290d966 6337:84e7d1a5e3df
    56 }
    56 }
    57 
    57 
    58 #pragma mark -
    58 #pragma mark -
    59 #pragma mark Spawner functions
    59 #pragma mark Spawner functions
    60 +(void) spawnThread:(NSString *)onSaveFile withOptions:(NSDictionary *)dictionary {
    60 +(void) spawnThread:(NSString *)onSaveFile withOptions:(NSDictionary *)dictionary {
    61     EngineProtocolNetwork *proto = [[EngineProtocolNetwork alloc] init];
    61     id proto = [[self alloc] init];
    62     proto.stream = (onSaveFile) ? [[NSOutputStream alloc] initToFileAtPath:onSaveFile append:YES] : nil;
    62     [proto setStream: (onSaveFile) ? [[NSOutputStream alloc] initToFileAtPath:onSaveFile append:YES] : nil];
    63     [proto.stream open];
    63     [[proto stream] open];
    64 
    64 
    65     // +detachNewThreadSelector retain/release self automatically
    65     // +detachNewThreadSelector retain/release self automatically
    66     [NSThread detachNewThreadSelector:@selector(engineProtocol:)
    66     [NSThread detachNewThreadSelector:@selector(engineProtocol:)
    67                              toTarget:proto
    67                              toTarget:proto
    68                            withObject:dictionary];
    68                            withObject:dictionary];