/[hegemonie]/hegemonie/Network/NetGameList.m
ViewVC logotype

Diff of /hegemonie/Network/NetGameList.m

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by thunder, Thu Jul 3 16:27:48 2003 UTC revision 1.7 by thunder, Fri Jul 11 16:23:46 2003 UTC
# Line 136  Line 136 
136    NSParameterAssert (gameID);    NSParameterAssert (gameID);
137    NSParameterAssert (playerName);    NSParameterAssert (playerName);
138    
139    HgGame *game = AUTORELEASE([[HgGame alloc] init]);    HgGame *game;
140        game = [[HgGame alloc] init];
141    
142    NSPort *receivePort = [NSPort port];    NSPort *receivePort = [NSPort port];
143      
144    NSPort *sendPort = [[gameID party] connectWithName: playerName    NSPort *sendPort = [[gameID party] connectWithName: playerName
145                                              withPort: receivePort                                              withPort: receivePort
146                                              initGame: game];                                              initGame: &game];
147      RETAIN(game);
148    
149    if (sendPort != nil)    if (sendPort != nil)
150      {      {
151        NetConnection *cnx = [NetConnection        NetConnection *cnx = [NetConnection
152                               connectionWithReceivePort: receivePort                               connectionWithReceivePort: receivePort
153                                                sendPort: sendPort];                                                sendPort: sendPort];
154                
155        NSDistantObject<NetInfosClient> *serverInfosClient = [cnx rootProxy];        NSDistantObject<NetInfosClient> *serverInfosClient = [cnx rootProxy];
156                
157        NetClient *client = AUTORELEASE ([[NetClient alloc]        NetClient *client = [[NetClient alloc]
158                                           initWithProxy: serverInfosClient                              initWithProxy: serverInfosClient
159                                           withGame: game]);                                   withGame: game];
160    
161        [cnx setRootObject: client];        [cnx setRootObject: client];
   
       //envoi du jeu du serveur sur la machine client  
       [client createGame: game];  
   
162        [serverInfosClient createProxy];        [serverInfosClient createProxy];
163        [serverInfosClient delegateClient];        [serverInfosClient delegateClient];
164    
165        //RELEASE(game);        //RELEASE(game);
166          
167        return client;        return client;
168      }      }
169    else    else

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26