846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
|
return _numberOfThreads;
}
#endif
- (void)start
{
void *pool = objc_autoreleasePoolPush();
if (_host == nil)
@throw [OFInvalidArgumentException exception];
if (_listeningSocket != nil)
@throw [OFAlreadyOpenException exceptionWithObject: self];
_listeningSocket = [[OFTCPSocket alloc] init];
_port = [_listeningSocket bindToHost: _host port: _port];
[_listeningSocket listen];
#ifdef OF_HAVE_THREADS
if (_numberOfThreads > 1) {
OFMutableArray *threads =
[OFMutableArray arrayWithCapacity: _numberOfThreads - 1];
|
>
|
>
|
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
|
return _numberOfThreads;
}
#endif
- (void)start
{
void *pool = objc_autoreleasePoolPush();
OFSocketAddress address;
if (_host == nil)
@throw [OFInvalidArgumentException exception];
if (_listeningSocket != nil)
@throw [OFAlreadyOpenException exceptionWithObject: self];
_listeningSocket = [[OFTCPSocket alloc] init];
address = [_listeningSocket bindToHost: _host port: _port];
_port = OFSocketAddressIPPort(&address);
[_listeningSocket listen];
#ifdef OF_HAVE_THREADS
if (_numberOfThreads > 1) {
OFMutableArray *threads =
[OFMutableArray arrayWithCapacity: _numberOfThreads - 1];
|