project_files/HedgewarsMobile/Classes/ServerProtocolNetwork.m
changeset 6337 84e7d1a5e3df
parent 6320 238a6dc0e7ad
child 6700 e04da46ee43c
equal deleted inserted replaced
6335:f753b290d966 6337:84e7d1a5e3df
    56     releaseAndNil(serverAddress);
    56     releaseAndNil(serverAddress);
    57     serverConnection = nil;
    57     serverConnection = nil;
    58     [super dealloc];
    58     [super dealloc];
    59 }
    59 }
    60 
    60 
    61 +(ServerProtocolNetwork *)openServerConnection {
    61 +(id) openServerConnection {
    62     ServerProtocolNetwork *connection = [[ServerProtocolNetwork alloc] init];
    62     id connection = [[self alloc] init];
    63     [NSThread detachNewThreadSelector:@selector(serverProtocol)
    63     [NSThread detachNewThreadSelector:@selector(serverProtocol)
    64                              toTarget:connection
    64                              toTarget:connection
    65                            withObject:nil];
    65                            withObject:nil];
    66     [connection retain];    // retain count here is +2
    66     [connection retain];    // retain count here is +2
    67     return connection;
    67     return connection;