ObjIRC  Check-in [4314708767]

Overview
Comment:Handle closed connection.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 4314708767bfb9f430a5e700e471993aa26c2d7bf0289982d82840dd55564d53
User & Date: js on 2012-02-16 14:56:10
Other Links: manifest | tags
Context
2012-02-16
17:27
Don't require an IRCUser where it is not necessary. check-in: b86913fa3e user: js tags: trunk
14:56
Handle closed connection. check-in: 4314708767 user: js tags: trunk
2011-10-24
18:34
Don't retain the delegate to prevent a reference cycle. check-in: c2aa35d109 user: js tags: trunk
Changes

Modified src/IRCConnection.h from [f8e3c6c8a1] to [2dd5077513].

66
67
68
69
70
71
72

73
74
75
76
77
78
79
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80







+







	  fromUser: (IRCUser*)user;
- (void)connection: (IRCConnection*)connection
  didReceiveNotice: (OFString*)notice
	  fromUser: (IRCUser*)user
	 inChannel: (IRCChannel*)channel;
-	   (void)connection: (IRCConnection*)connection
  didReceiveNamesForChannel: (IRCChannel*)channel;
- (void)connectionWasClosed: (IRCConnection*)connection;
@end

@interface IRCConnection: OFObject
{
	OFTCPSocket *sock;
	OFString *server;
	uint16_t port;

Modified src/IRCConnection.m from [687bea590f] to [20a6c839f4].

165
166
167
168
169
170
171








172
173
174
175
176
177
178
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186







+
+
+
+
+
+
+
+








- (void)process
{
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
	OFString *line;
	OFArray *split;
	OFString *action = nil;

	if (sock.atEndOfStream) {
		if ([delegate respondsToSelector:
		    @selector(connectionWasClosed:)])
			[delegate connectionWasClosed: self];

		return;
	}

	@try {
		line = [sock tryReadLine];
	} @catch (OFInvalidEncodingException *e) {
		line = [sock tryReadLineWithEncoding:
		    OF_STRING_ENCODING_WINDOWS_1252];
	}

Modified src/Makefile from [9581b1e60d] to [f955360b17].

1
2
3
4
5




1
2
3
4
5
6
7
8
9





+
+
+
+
all:
	objfw-compile -Wall -g --lib 0.0 -o objirc *.m

clean:
	rm -f *.o *.so *.dylib *.dll

install:
	cp *.h /usr/local/include/ObjIRC/
	cp libobjirc.dylib /usr/local/lib/