Skip to content

Instantly share code, notes, and snippets.

@sebastienwindal
Created October 29, 2012 15:35
Show Gist options
  • Select an option

  • Save sebastienwindal/3974221 to your computer and use it in GitHub Desktop.

Select an option

Save sebastienwindal/3974221 to your computer and use it in GitHub Desktop.
.m file example
//
// 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