Differences From Artifact [34fd2a42ae]:
- File
tests/OFSPXSocketTests.m
— part of check-in
[578a0778b5]
at
2023-01-13 01:35:55
on branch trunk
— OFSPX*SocketTests: Do not compare remote's network
It can be different due to IPX internal networks. (user: js, size: 5524) [annotate] [blame] [check-ins using]
To Artifact [69c423c289]:
- File tests/OFSPXSocketTests.m — part of check-in [652dc3c52b] at 2023-06-17 21:55:31 on branch trunk — OFSPX*SocketTests: Connect to specific net + node (user: js, size: 6111) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
75 76 77 78 79 80 81 82 83 84 85 86 87 88 | void *pool = objc_autoreleasePoolPush(); OFSPXSocket *sockClient, *sockServer = nil, *sockAccepted; OFSocketAddress address1; const OFSocketAddress *address2; uint32_t network; unsigned char node[IPX_NODE_LEN], node2[IPX_NODE_LEN]; uint16_t port; char buffer[5]; SPXSocketDelegate *delegate; TEST(@"+[socket]", (sockClient = [OFSPXSocket socket]) && (sockServer = [OFSPXSocket socket])) @try { | > | 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | void *pool = objc_autoreleasePoolPush(); OFSPXSocket *sockClient, *sockServer = nil, *sockAccepted; OFSocketAddress address1; const OFSocketAddress *address2; uint32_t network; unsigned char node[IPX_NODE_LEN], node2[IPX_NODE_LEN]; uint16_t port; OFDictionary *networkInterfaces; char buffer[5]; SPXSocketDelegate *delegate; TEST(@"+[socket]", (sockClient = [OFSPXSocket socket]) && (sockServer = [OFSPXSocket socket])) @try { |
︙ | ︙ | |||
119 120 121 122 123 124 125 126 127 128 129 130 131 132 | } network = OFSocketAddressIPXNetwork(&address1); OFSocketAddressGetIPXNode(&address1, node); port = OFSocketAddressIPXPort(&address1); TEST(@"-[listen]", R([sockServer listen])) TEST(@"-[connectToNetwork:node:port:]", R([sockClient connectToNetwork: network node: node port: port])) TEST(@"-[accept]", (sockAccepted = [sockServer accept])) TEST(@"-[sendBuffer:length:]", | > > > > > > > > > > > > > > > > > > | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | } network = OFSocketAddressIPXNetwork(&address1); OFSocketAddressGetIPXNode(&address1, node); port = OFSocketAddressIPXPort(&address1); TEST(@"-[listen]", R([sockServer listen])) /* * Find any network interface with IPX and send to it. Any should be * fine since we bound to 0.0. */ networkInterfaces = [OFSystemInfo networkInterfaces]; for (OFString *name in networkInterfaces) { OFNetworkInterface interface = [networkInterfaces objectForKey: name]; OFData *addresses = [interface objectForKey: OFNetworkInterfaceIPXAddresses]; if (addresses.count == 0) continue; network = OFSocketAddressIPXNetwork([addresses itemAtIndex: 0]); OFSocketAddressGetIPXNode([addresses itemAtIndex: 0], node); } TEST(@"-[connectToNetwork:node:port:]", R([sockClient connectToNetwork: network node: node port: port])) TEST(@"-[accept]", (sockAccepted = [sockServer accept])) TEST(@"-[sendBuffer:length:]", |
︙ | ︙ |