66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
R([sockClient connectToPath: path]))
TEST(@"-[accept]", (sockAccepted = [sockServer accept]))
TEST(@"-[writeBuffer:length:]",
R([sockAccepted writeBuffer: "Hello" length: 5]))
TEST(@"-[receiveIntoBuffer:length:]",
[sockClient readIntoBuffer: buffer length: 5] == 5 &&
memcmp(buffer, "Hello", 5) == 0)
TEST(@"-[remoteAddress]",
OFSocketAddressUNIXPath(sockAccepted.remoteAddress) == nil)
} @finally {
#ifdef OF_HAVE_FILES
|
|
|
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
R([sockClient connectToPath: path]))
TEST(@"-[accept]", (sockAccepted = [sockServer accept]))
TEST(@"-[writeBuffer:length:]",
R([sockAccepted writeBuffer: "Hello" length: 5]))
TEST(@"-[readIntoBuffer:length:]",
[sockClient readIntoBuffer: buffer length: 5] == 5 &&
memcmp(buffer, "Hello", 5) == 0)
TEST(@"-[remoteAddress]",
OFSocketAddressUNIXPath(sockAccepted.remoteAddress) == nil)
} @finally {
#ifdef OF_HAVE_FILES
|