123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
* @brief Asynchronously 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
/*!
* @brief Asynchronously connect the OFTCPSocket to the specified destination.
*
* @param host The host to connect to
* @param port The port on the host to connect to
|
|
>
|
>
|
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
|
* @brief Asynchronously 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, id context,
* OFException *exception)`.
*/
- (void)asyncConnectToHost: (OFString *)host
port: (uint16_t)port
target: (id)target
selector: (SEL)selector
context: (nullable id)context;
# ifdef OF_HAVE_BLOCKS
/*!
* @brief Asynchronously connect the OFTCPSocket to the specified destination.
*
* @param host The host to connect to
* @param port The port on the host to connect to
|
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
|
*
* @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 Asynchronously accept an incoming connection.
*
* @param block The block to execute when a new connection has been accepted.
* Returns whether the next incoming connection should be accepted
|
|
|
>
|
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
|
*
* @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,
* id context, OFException *exception)`.
*/
- (void)asyncAcceptWithTarget: (id)target
selector: (SEL)selector
context: (nullable id)context;
#ifdef OF_HAVE_BLOCKS
/*!
* @brief Asynchronously accept an incoming connection.
*
* @param block The block to execute when a new connection has been accepted.
* Returns whether the next incoming connection should be accepted
|