project_files/HedgewarsMobile/Classes/EngineProtocolNetwork.h
changeset 6870 f72cac290325
parent 6868 f31b5213b163
child 10108 c68cf030eded
equal deleted inserted replaced
6869:a187c280dd3d 6870:f72cac290325
    19 
    19 
    20 #import <Foundation/Foundation.h>
    20 #import <Foundation/Foundation.h>
    21 #import "SDL_net.h"
    21 #import "SDL_net.h"
    22 
    22 
    23 
    23 
       
    24 @protocol EngineProtocolDelegate <NSObject>
       
    25 
       
    26 -(void) gameEndedWithStatistics:(NSArray *)stats;
       
    27 
       
    28 @end
       
    29 
       
    30 
    24 @interface EngineProtocolNetwork : NSObject {
    31 @interface EngineProtocolNetwork : NSObject {
    25     NSMutableArray *statsArray;
    32     id<EngineProtocolDelegate> delegate;
    26     NSOutputStream *stream;
    33     NSOutputStream *stream;
    27     TCPsocket csd;
    34     TCPsocket csd;
    28     NSInteger enginePort;
    35     NSInteger enginePort;
    29 }
    36 }
    30 
    37 
    31 @property (nonatomic,assign) NSMutableArray *statsArray;
    38 @property (nonatomic,assign) id<EngineProtocolDelegate> delegate;
    32 @property (nonatomic,retain) NSOutputStream *stream;
    39 @property (nonatomic,retain) NSOutputStream *stream;
    33 @property (assign) TCPsocket csd;
    40 @property (assign) TCPsocket csd;
    34 @property (assign) NSInteger enginePort;
    41 @property (assign) NSInteger enginePort;
    35 
    42 
    36 -(id)   init;
    43 -(id)   init;
       
    44 -(id)   initWithPort:(NSInteger) port;
    37 -(void) spawnThread:(NSString *)onSaveFile withOptions:(NSDictionary *)dictionary;
    45 -(void) spawnThread:(NSString *)onSaveFile withOptions:(NSDictionary *)dictionary;
    38 -(void) engineProtocol:(id) object;
    46 -(void) engineProtocol:(id) object;
    39 
    47 
    40 -(int)  sendToEngine:(NSString *)string;
    48 -(int)  sendToEngine:(NSString *)string;
    41 -(int)  sendToEngineNoSave:(NSString *)string;
    49 -(int)  sendToEngineNoSave:(NSString *)string;