38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
+ (void)initialize
{
if (self == [OFTCPSocket class])
lock = [[OFObject alloc] init];
}
#endif
+ socket
{
return [[[OFTCPSocket alloc] init] autorelease];
}
- init
{
self = [super init];
sock = INVALID_SOCKET;
saddr = NULL;
return self;
}
- (void)dealloc
{
if (sock != INVALID_SOCKET)
close(sock);
[super dealloc];
}
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
+ (void)initialize
{
if (self == [OFTCPSocket class])
lock = [[OFObject alloc] init];
}
#endif
- (void)dealloc
{
if (sock != INVALID_SOCKET)
close(sock);
[super dealloc];
}
|