Differences From Artifact [cd657843ce]:
- File src/OFTCPSocket.h — part of check-in [4f149012e9] at 2012-09-19 23:57:01 on branch trunk — Make async connecting possible without blocks. (user: js, size: 6321) [annotate] [blame] [check-ins using]
To Artifact [facc710023]:
- File
src/OFTCPSocket.h
— part of check-in
[6343e04dcd]
at
2012-10-17 20:16:10
on branch trunk
— Pass exceptions on async I/O.
This makes it possible to handle exceptions that occurred during async
I/O in the specified handler. (user: js, size: 6408) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
33 34 35 36 37 38 39 | # include <ws2tcpip.h> #endif @class OFTCPSocket; @class OFString; #ifdef OF_HAVE_BLOCKS | | | > | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | # include <ws2tcpip.h> #endif @class OFTCPSocket; @class OFString; #ifdef OF_HAVE_BLOCKS typedef void (^of_tcpsocket_async_connect_block_t)(OFTCPSocket*, OFException*); typedef BOOL (^of_tcpsocket_async_accept_block_t)(OFTCPSocket*, OFTCPSocket*, OFException*); #endif /** * \brief A class which provides functions to create and use TCP sockets. * * To connect to a server, create a socket and connect it. * To create a server, create a socket, bind it and listen on it. |
︙ | ︙ | |||
133 134 135 136 137 138 139 | * \brief Asyncronously connect the OFTCPSocket to the specified destination. * * \param host The host to connect to * \param port The port on the host to connect to * \param target The target on which to call the selector once the connection * has been established * \param selector The selector to call on the target. The signature must be | | | 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | * \brief Asyncronously connect the OFTCPSocket to the specified destination. * * \param host The host to connect to * \param port The port on the host to connect to * \param target The target on which to call the selector once the connection * has been established * \param selector The selector to call on the target. The signature must be * void (OFTCPSocket *socket, OFException *exception). */ - (void)asyncConnectToHost: (OFString*)host port: (uint16_t)port target: (id)target selector: (SEL)selector; #ifdef OF_HAVE_BLOCKS |
︙ | ︙ | |||
192 193 194 195 196 197 198 | * \brief Asyncronously ccept an incoming connection. * * \param target The target on which to execute the selector when a new * connection has been accepted. The method returns whether the * next incoming connection should be accepted by the specified * block as well. * \param selector The selector to call on the target. The signature must be | | > | 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | * \brief Asyncronously ccept an incoming connection. * * \param target The target on which to execute the selector when a new * connection has been accepted. The method returns whether the * next incoming connection should be accepted by the specified * block as well. * \param selector The selector to call on the target. The signature must be * BOOL (OFTCPSocket *socket, OFTCPSocket *acceptedSocket, * OFException *exception). */ - (void)asyncAcceptWithTarget: (id)target selector: (SEL)selector; #ifdef OF_HAVE_BLOCKS /** * \brief Asyncronously ccept an incoming connection. |
︙ | ︙ |