Differences From Artifact [80903ac435]:
- File
src/OFHTTPServer.m
— part of check-in
[75f187cef5]
at
2012-12-26 20:55:27
on branch trunk
— OFHTTPRequestResult -> OFHTTPRequestReply.
The class also has its own file now. (user: js, size: 14089) [annotate] [blame] [check-ins using]
To Artifact [f75ba40071]:
- File
src/OFHTTPServer.m
— part of check-in
[df7b88405a]
at
2012-12-27 11:21:43
on branch trunk
— OFHTTPServer: Pass errors from listening socket.
This way, it is possible to recover from errors by e.g. stopping the
server in the main thread and then restarting it, or by just ignoring
the exception. (user: js, size: 14288) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
640 641 642 643 644 645 646 | - (BOOL)OF_socket: (OFTCPSocket*)socket didAcceptSocket: (OFTCPSocket*)clientSocket exception: (OFException*)exception { OFHTTPServer_Connection *connection; | | > > > > > > | 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 | - (BOOL)OF_socket: (OFTCPSocket*)socket didAcceptSocket: (OFTCPSocket*)clientSocket exception: (OFException*)exception { OFHTTPServer_Connection *connection; if (exception != nil) { if ([delegate respondsToSelector: @selector(server:didReceiveExceptionOnListeningSocket:)]) return [delegate server: self didReceiveExceptionOnListeningSocket: exception]; return NO; } connection = [[[OFHTTPServer_Connection alloc] initWithSocket: clientSocket server: self] autorelease]; [clientSocket asyncReadLineWithTarget: connection selector: @selector(socket:didReadLine: exception:)]; return YES; } @end |