35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
{
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
OFTCPSocket *server, *client = nil, *accepted;
OFString *msg;
uint16_t port;
char buf[6];
srand(time(NULL));
port = (uint16_t)rand();
if (port < 1024)
port += 1024;
TEST(@"+[socket]", (server = [OFTCPSocket socket]) &&
(client = [OFTCPSocket socket]))
|
|
|
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
{
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
OFTCPSocket *server, *client = nil, *accepted;
OFString *msg;
uint16_t port;
char buf[6];
srand((unsigned)time(NULL));
port = (uint16_t)rand();
if (port < 1024)
port += 1024;
TEST(@"+[socket]", (server = [OFTCPSocket socket]) &&
(client = [OFTCPSocket socket]))
|