Differences From Artifact [2f642831d8]:
- File src/OFHTTPServer.m — part of check-in [3b97fc3cd9] at 2014-01-04 00:24:08 on branch trunk — Update copyright. (user: js, size: 15391) [annotate] [blame] [check-ins using]
To Artifact [3104ed8898]:
- File
src/OFHTTPServer.m
— part of check-in
[1724525754]
at
2014-02-11 14:44:03
on branch trunk
— OFHTTPServer: Allow binding to port 0
This allows binding to a random port and calling [server port] to get
the port used. (user: js, size: 15386) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
682 683 684 685 686 687 688 | - (OFString*)name { OF_GETTER(_name, true) } - (void)start { | | | | | 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 | - (OFString*)name { OF_GETTER(_name, true) } - (void)start { if (_host == nil) @throw [OFInvalidArgumentException exception]; if (_listeningSocket != nil) @throw [OFAlreadyConnectedException exception]; _listeningSocket = [[OFTCPSocket alloc] init]; _port = [_listeningSocket bindToHost: _host port: _port]; [_listeningSocket listen]; [_listeningSocket asyncAcceptWithTarget: self selector: @selector(OF_socket: didAcceptSocket: exception:)]; } |
︙ | ︙ |