This repository has been archived on 2025-08-18. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
GGS/games/Pong/Classes/GGSNetwork.h
2011-03-06 01:11:28 +01:00

34 lines
910 B
Objective-C

//
// Network.h
// Pong
//
// Created by Jeena on 27.02.11.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "AsyncSocket.h"
#import "GGSDelegate.h"
@protocol GGSDelegate;
@interface GGSNetwork : NSObject {
AsyncSocket *asyncSocket;
id<GGSDelegate> delegate;
NSString *gameToken;
NSDictionary *currentHeaders;
}
@property (nonatomic, retain) AsyncSocket *asyncSocket;
@property (nonatomic, retain) id<GGSDelegate> delegate;
@property (nonatomic, retain) NSDictionary *currentHeaders;
@property (nonatomic, retain) NSString *gameToken;
- (id)initWithDelegate:(id)delegate;
- (NSData *)makeMessageFor:(NSString *)serverOrGame withCommand:(NSString *)command andArgs:(NSString *)args;
- (void)parseAndSetHeader:(NSData *)headerData;
- (void)define:(NSString *)sourceCode;
- (void)sendCommand:(NSString *)command withArgs:(NSString *)args;
@end