Overview
Comment: | Autodetect family in -[bindService:onNode:]. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
ca53d41c0f9543bc50b8c109dd610f3f |
User & Date: | js on 2011-01-22 23:53:13 |
Other Links: | manifest | tags |
Context
2011-01-24
| ||
20:20 | ObjC++ needs those defines for <stdin.h>. check-in: 5ad479153e user: js tags: trunk | |
2011-01-22
| ||
23:53 | Autodetect family in -[bindService:onNode:]. check-in: ca53d41c0f user: js tags: trunk | |
23:35 | Don't send two packets in -[OFStream writeLine:]. check-in: d2b0beab38 user: js tags: trunk | |
Changes
Modified src/OFExceptions.h from [a9ea4a0db3] to [3d68b9c6ab].
︙ | |||
1040 1041 1042 1043 1044 1045 1046 | 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 | - - - - + - - - + - - - - - - | /** * \brief An exception indicating that binding a socket failed. */ @interface OFBindFailedException: OFException { OFString *node; OFString *service; |
︙ |
Modified src/OFExceptions.m from [8d877139a9] to [ff08f95514].
︙ | |||
1517 1518 1519 1520 1521 1522 1523 | 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 | - - + - - - | } @end @implementation OFBindFailedException + newWithClass: (Class)class_ node: (OFString*)node service: (OFString*)service |
︙ | |||
1567 1568 1569 1570 1571 1572 1573 | 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 | - - - + + + - - - - - | - (OFString*)description { if (description != nil) return description; description = [[OFString alloc] initWithFormat: |
︙ |
Modified src/OFTCPSocket.h from [5f5aec5406] to [4276a55e09].
︙ | |||
54 55 56 57 58 59 60 | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | - + - | * * \param service The service to bind * \param node The node to bind to. Use @"0.0.0.0" for IPv4 or @"::" for IPv6 * to bind to all. * \param family The family to use (AF_INET for IPv4 or AF_INET6 for IPv6) */ - (void)bindService: (OFString*)service |
︙ |
Modified src/OFTCPSocket.m from [94deb56f45] to [8771225ab8].
︙ | |||
197 198 199 200 201 202 203 | 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 | - - - - - - - - - - - - - - - - + - + - - - + + + + + - + - | @throw [OFConnectionFailedException newWithClass: isa node: node service: service]; } - (void)bindService: (OFString*)service onNode: (OFString*)node |
︙ | |||
270 271 272 273 274 275 276 | 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 | - - - - + + + + - + - | if ((se = getservbyname([service cString], "TCP")) != NULL) port = se->s_port; else if ((port = OF_BSWAP16_IF_LE(strtol([service cString], NULL, 10))) == 0) { # ifdef OF_THREADS [mutex unlock]; # endif |
︙ |
Modified tests/OFTCPSocketTests.m from [85d97971df] to [fca04a710e].
︙ | |||
45 46 47 48 49 50 51 | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | - + - + - | port += 1024; service = [OFString stringWithFormat: @"%d", port]; TEST(@"+[socket]", (server = [OFTCPSocket socket]) && (client = [OFTCPSocket socket])) msg = [OFString stringWithFormat: |
︙ |