17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#import "OFAlreadyConnectedException.h"
#import "OFString.h"
@implementation OFAlreadyConnectedException
@synthesize socket = _socket;
+ (instancetype)exceptionWithSocket: (id)socket
{
return [[[self alloc] initWithSocket: socket] autorelease];
}
- (instancetype)init
{
return [self initWithSocket: nil];
}
- (instancetype)initWithSocket: (id)socket
{
self = [super init];
_socket = [socket retain];
return self;
}
- (void)dealloc
{
[_socket release];
|
|
|
|
|
|
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#import "OFAlreadyConnectedException.h"
#import "OFString.h"
@implementation OFAlreadyConnectedException
@synthesize socket = _socket;
+ (instancetype)exceptionWithSocket: (id)sock
{
return [[[self alloc] initWithSocket: sock] autorelease];
}
- (instancetype)init
{
return [self initWithSocket: nil];
}
- (instancetype)initWithSocket: (id)sock
{
self = [super init];
_socket = [sock retain];
return self;
}
- (void)dealloc
{
[_socket release];
|