34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
}
@end
@implementation HTTPClientTestsServer
- (id)main
{
OFTCPSocket *listener, *client;
char buffer[5];
[condition lock];
listener = [OFTCPSocket socket];
_port = [listener bindToHost: @"127.0.0.1" port: 0];
[listener listen];
[condition signal];
[condition unlock];
client = [listener accept];
|
>
|
>
|
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
}
@end
@implementation HTTPClientTestsServer
- (id)main
{
OFTCPSocket *listener, *client;
OFSocketAddress address;
char buffer[5];
[condition lock];
listener = [OFTCPSocket socket];
address = [listener bindToHost: @"127.0.0.1" port: 0];
_port = OFSocketAddressIPPort(&address);
[listener listen];
[condition signal];
[condition unlock];
client = [listener accept];
|