26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#ifdef OF_HAVE_BLOCKS
/**
* @brief A block which is called when the socket connected.
*
* @param exception An exception which occurred while connecting the socket or
* `nil` on success
*/
typedef void (^of_spx_socket_async_connect_block_t)(id _Nullable exception);
#endif
/**
* @protocol OFSPXSocketDelegate OFSPXSocket.h ObjFW/OFSPXSocket.h
*
* A delegate for OFSPXSocket.
*/
|
|
|
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#ifdef OF_HAVE_BLOCKS
/**
* @brief A block which is called when the socket connected.
*
* @param exception An exception which occurred while connecting the socket or
* `nil` on success
*/
typedef void (^OFSPXSocketAsyncConnectBlock)(id _Nullable exception);
#endif
/**
* @protocol OFSPXSocketDelegate OFSPXSocket.h ObjFW/OFSPXSocket.h
*
* A delegate for OFSPXSocket.
*/
|
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
|
* @param port The port (sometimes also called socket number) on the node to
* connect to
* @param runLoopMode The run loop mode in which to perform the async connect
*/
- (void)asyncConnectToNode: (unsigned char [_Nonnull IPX_NODE_LEN])node
network: (uint32_t)network
port: (uint16_t)port
runLoopMode: (of_run_loop_mode_t)runLoopMode;
#ifdef OF_HAVE_BLOCKS
/**
* @brief Asynchronously connect the OFSPXSocket to the specified destination.
*
* @param node The node to connect to
* @param network The network on which the node to connect to is
* @param port The port (sometimes also called socket number) on the node to
* connect to
* @param block The block to execute once the connection has been established
*/
- (void)asyncConnectToNode: (unsigned char [_Nonnull IPX_NODE_LEN])node
network: (uint32_t)network
port: (uint16_t)port
block: (of_spx_socket_async_connect_block_t)block;
/**
* @brief Asynchronously connect the OFSPXSocket to the specified destination.
*
* @param node The node to connect to
* @param network The network on which the node to connect to is
* @param port The port (sometimes also called socket number) on the node to
* connect to
* @param runLoopMode The run loop mode in which to perform the async connect
* @param block The block to execute once the connection has been established
*/
- (void)asyncConnectToNode: (unsigned char [_Nonnull IPX_NODE_LEN])node
network: (uint32_t)network
port: (uint16_t)port
runLoopMode: (of_run_loop_mode_t)runLoopMode
block: (of_spx_socket_async_connect_block_t)block;
#endif
/**
* @brief Bind the socket to the specified network, node and port.
*
* @param port The port (sometimes called socket number) to bind to. 0 means to
* pick one and return it.
* @return The address on which this socket can be reached
*/
- (of_socket_address_t)bindToPort: (uint16_t)port;
@end
OF_ASSUME_NONNULL_END
|
|
|
|
|
|
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
|
* @param port The port (sometimes also called socket number) on the node to
* connect to
* @param runLoopMode The run loop mode in which to perform the async connect
*/
- (void)asyncConnectToNode: (unsigned char [_Nonnull IPX_NODE_LEN])node
network: (uint32_t)network
port: (uint16_t)port
runLoopMode: (OFRunLoopMode)runLoopMode;
#ifdef OF_HAVE_BLOCKS
/**
* @brief Asynchronously connect the OFSPXSocket to the specified destination.
*
* @param node The node to connect to
* @param network The network on which the node to connect to is
* @param port The port (sometimes also called socket number) on the node to
* connect to
* @param block The block to execute once the connection has been established
*/
- (void)asyncConnectToNode: (unsigned char [_Nonnull IPX_NODE_LEN])node
network: (uint32_t)network
port: (uint16_t)port
block: (OFSPXSocketAsyncConnectBlock)block;
/**
* @brief Asynchronously connect the OFSPXSocket to the specified destination.
*
* @param node The node to connect to
* @param network The network on which the node to connect to is
* @param port The port (sometimes also called socket number) on the node to
* connect to
* @param runLoopMode The run loop mode in which to perform the async connect
* @param block The block to execute once the connection has been established
*/
- (void)asyncConnectToNode: (unsigned char [_Nonnull IPX_NODE_LEN])node
network: (uint32_t)network
port: (uint16_t)port
runLoopMode: (OFRunLoopMode)runLoopMode
block: (OFSPXSocketAsyncConnectBlock)block;
#endif
/**
* @brief Bind the socket to the specified network, node and port.
*
* @param port The port (sometimes called socket number) to bind to. 0 means to
* pick one and return it.
* @return The address on which this socket can be reached
*/
- (of_socket_address_t)bindToPort: (uint16_t)port;
@end
OF_ASSUME_NONNULL_END
|