Overview
| Comment: | Use sockaddr_storage instead of sockaddr in OFTCPSocket. This ensures it's big enough and correctly aligned. |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
7a5b65ee4df292ef1dbe7c6db94dc514 |
| User & Date: | js on 2011-07-17 02:03:44 |
| Other Links: | manifest | tags |
Context
|
2011-07-17
| ||
| 02:11 | Include sys/types.h in of_asprintf.m. (check-in: 506c012ec2 user: js tags: trunk) | |
| 02:03 |
Use sockaddr_storage instead of sockaddr in OFTCPSocket. This ensures it's big enough and correctly aligned. (check-in: 7a5b65ee4d user: js tags: trunk) | |
| 01:55 | Define __NO_EXT_QNX in files using unistd.h or fcntl.h. (check-in: da2701ad14 user: js tags: trunk) | |
Changes
Modified src/OFTCPSocket.h from [abc527a77c] to [cffdc41556].
| ︙ | |||
33 34 35 36 37 38 39 | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | - + |
*
* To connect to a server, create a socket and connect it.
* To create a server, create a socket, bind it and listen on it.
*/
@interface OFTCPSocket: OFStreamSocket
{
BOOL isListening;
|
| ︙ |
Modified src/OFTCPSocket.m from [d0efc140d4] to [2ff5fb89f7].
| ︙ | |||
347 348 349 350 351 352 353 | 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 | - + - + + |
isListening = YES;
}
- (OFTCPSocket*)accept
{
OFTCPSocket *newSocket;
|
| ︙ | |||
395 396 397 398 399 400 401 | 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 | - - + + |
@throw [OFInvalidArgumentException newWithClass: isa
selector: _cmd];
#ifdef HAVE_THREADSAFE_GETADDRINFO
host = [self allocMemoryWithSize: NI_MAXHOST];
@try {
|
| ︙ |