14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
* file.
*/
#include "config.h"
#import "OFAlreadyConnectedException.h"
#import "OFString.h"
#import "OFTCPSocket.h"
#import "common.h"
@implementation OFAlreadyConnectedException
+ (instancetype)exceptionWithSocket: (OFTCPSocket*)socket
{
return [[[self alloc] initWithSocket: socket] autorelease];
}
- initWithSocket: (OFTCPSocket*)socket
{
self = [super init];
_socket = [socket retain];
return self;
}
|
<
|
|
|
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
* file.
*/
#include "config.h"
#import "OFAlreadyConnectedException.h"
#import "OFString.h"
#import "common.h"
@implementation OFAlreadyConnectedException
+ (instancetype)exceptionWithSocket: (id)socket
{
return [[[self alloc] initWithSocket: socket] autorelease];
}
- initWithSocket: (id)socket
{
self = [super init];
_socket = [socket retain];
return self;
}
|
51
52
53
54
55
56
57
58
59
60
61
62
|
@"The socket of type %@ is already connected or bound and "
@"thus can't be connected or bound again!",
[_socket class]];
else
return @"A connection has already been established!";
}
- (OFTCPSocket*)socket
{
OF_GETTER(_socket, true)
}
@end
|
|
|
50
51
52
53
54
55
56
57
58
59
60
61
|
@"The socket of type %@ is already connected or bound and "
@"thus can't be connected or bound again!",
[_socket class]];
else
return @"A connection has already been established!";
}
- (id)socket
{
OF_GETTER(_socket, true)
}
@end
|