]> Dogcows Code - chaz/thecheat/blob - ServerHolder.m
The Cheat 1.0b4
[chaz/thecheat] / ServerHolder.m
1
2 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 // Project: The Cheat
4 //
5 // File: ServerHolder.m
6 // Created: Sun Sep 28 2003
7 //
8 // Copyright: 2003 Chaz McGarvey. All rights reserved.
9 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10
11 #import "ServerHolder.h"
12
13 #import "CheatServer.h"
14
15
16 @implementation ServerHolder
17
18
19 + (ServerHolder *)holderWithConnection:(NSConnection *)conn socket:(int)sock
20 {
21 return [[[ServerHolder alloc] initWithConnection:conn socket:sock] autorelease];
22 }
23
24 - (id)initWithConnection:(NSConnection *)conn socket:(int)sock
25 {
26 if ( self = [super init] )
27 {
28 connection = [conn retain];
29 sockfd = sock;
30 }
31
32 return self;
33 }
34
35
36 - (NSConnection *)connection
37 {
38 return connection;
39 }
40
41 - (void)setConnection:(NSConnection *)conn
42 {
43 [connection release];
44 connection = [conn retain];
45 }
46
47 - (CheatServer *)server
48 {
49 return server;
50 }
51
52 - (void)setServer:(CheatServer *)serv
53 {
54 [server release];
55 server = [serv retain];
56 }
57
58
59 - (int)sockfd
60 {
61 return sockfd;
62 }
63
64 - (void)setSockFD:(int)sock
65 {
66 sockfd = sock;
67 }
68
69
70 - (NSString *)address
71 {
72 return address;
73 }
74
75 - (void)setAddress:(NSString *)addr
76 {
77 [address release];
78 address = [addr retain];
79 }
80
81 - (NSString *)action
82 {
83 return action;
84 }
85
86 - (void)setAction:(NSString *)act
87 {
88 [action release];
89 action = [act retain];
90 }
91
92
93 - (void)dealloc
94 {
95 [connection release];
96 [server release];
97
98 [super dealloc];
99 }
100
101
102 @end
This page took 0.031662 seconds and 4 git commands to generate.