Created
October 29, 2012 15:35
-
-
Save sebastienwindal/3974221 to your computer and use it in GitHub Desktop.
.m file example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // WGenServer.m | |
| // WgenTestCommon | |
| // | |
| // Created by Sebastian Windal on 10/24/12. | |
| // Copyright (c) 2012 Sebastian Windal. All rights reserved. | |
| // | |
| #import "WGenServer.h" | |
| #import "GCDAsyncSocket.h" | |
| #import "DDLog.h" | |
| #import "DDTTYLogger.h" | |
| #import "DDASLLogger.h" | |
| #import "NetworkHelper.h" | |
| #import "NSData+SockAddr.h" | |
| #import "PeerInfo.h" | |
| @interface WGenServer()<NSNetServiceDelegate, GCDAsyncSocketDelegate> | |
| @property (nonatomic, strong) GCDAsyncSocket *asyncSocket; | |
| @property (nonatomic, strong) NSMutableArray *peers; | |
| @property (nonatomic, strong) NSNetService *netService; | |
| @property (nonatomic, strong) NSString *sessionID; | |
| @property (nonatomic, strong) NSTimer *keepAliveTimer; | |
| @end | |
| static const int ddLogLevel = LOG_LEVEL_VERBOSE; | |
| @implementation WGenServer | |
| -(id) init | |
| { | |
| [DDLog addLogger:[DDTTYLogger sharedInstance]]; | |
| [DDLog addLogger:[DDASLLogger sharedInstance]]; | |
| self = [super init]; | |
| if (self) | |
| { | |
| } | |
| return self; | |
| } | |
| @end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment