Overview
Comment: | Clean up OFStream and OFSocket interface. This allows better compile-time checks. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
273d5b90f8c443318be684decfada66e |
User & Date: | js on 2010-01-22 18:40:04 |
Other Links: | manifest | tags |
Context
2010-01-22
| ||
18:52 | Differentiate more between OFArray and OFMutableArray in tests. check-in: 7e47fcb96a user: js tags: trunk | |
18:40 |
Clean up OFStream and OFSocket interface. This allows better compile-time checks. check-in: 273d5b90f8 user: js tags: trunk | |
2010-01-17
| ||
13:11 | uintptr_t might be better here. check-in: 453532ccf3 user: js tags: trunk | |
Changes
Modified src/OFSocket.h from [ac924aea1f] to [7dfa9cbdaf].
︙ | ︙ | |||
51 52 53 54 55 56 57 | */ + socket; /** * Enables/disables non-blocking I/O. */ - setBlocking: (BOOL)enable; | < < < < < < < < < < < | 51 52 53 54 55 56 57 58 | */ + socket; /** * Enables/disables non-blocking I/O. */ - setBlocking: (BOOL)enable; @end |
Modified src/OFSocket.m from [58e9bceec8] to [90f67dc16d].
︙ | ︙ | |||
108 109 110 111 112 113 114 | if (ioctlsocket(sock, FIONBIO, &v) == SOCKET_ERROR) @throw [OFSetOptionFailedException newWithClass: isa]; #endif return self; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 108 109 110 111 112 113 114 115 | if (ioctlsocket(sock, FIONBIO, &v) == SOCKET_ERROR) @throw [OFSetOptionFailedException newWithClass: isa]; #endif return self; } @end |
Modified src/OFTCPSocket.h from [fd6abf078a] to [afa9fb265e].
︙ | ︙ | |||
49 50 51 52 53 54 55 | */ - listen; /** * Accept an incoming connection. * \return An autoreleased OFTCPSocket for the accepted connection. */ | | < < < < < | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | */ - listen; /** * Accept an incoming connection. * \return An autoreleased OFTCPSocket for the accepted connection. */ - (OFTCPSocket*)accept; /** * Enable or disable keep alives for the connection. */ - enableKeepAlives: (BOOL)enable; @end |
Modified src/OFTCPSocket.m from [b8414e989f] to [e5e0123628].
︙ | ︙ | |||
310 311 312 313 314 315 316 | if (listen(sock, 5) == -1) @throw [OFListenFailedException newWithClass: isa backLog: 5]; return self; } | | | 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 | if (listen(sock, 5) == -1) @throw [OFListenFailedException newWithClass: isa backLog: 5]; return self; } - (OFTCPSocket*)accept { OFTCPSocket *newsock; struct sockaddr *addr; socklen_t addrlen; int s; newsock = [OFTCPSocket socket]; |
︙ | ︙ |
Modified tests/OFTCPSocket.m from [90a6cf5f0f] to [6b65fc55ca].
︙ | ︙ | |||
25 26 27 28 29 30 31 | static OFString *module = @"OFTCPSocket"; void tcpsocket_tests() { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; | | | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | static OFString *module = @"OFTCPSocket"; void tcpsocket_tests() { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFTCPSocket *server, *client = nil, *accepted; OFString *service, *msg; uint16_t port; char buf[6]; srand(time(NULL)); port = (uint16_t)rand(); if (port < 1024) |
︙ | ︙ |