| 270 * Returns: NULL if there was an error, or a reference to an |
270 * Returns: NULL if there was an error, or a reference to an |
| 271 * opaque data structure that can be used to cancel |
271 * opaque data structure that can be used to cancel |
| 272 * the pending connection, if needed. |
272 * the pending connection, if needed. |
| 273 */ |
273 */ |
| 274 PurpleProxyConnectData *purple_proxy_connect(void *handle, |
274 PurpleProxyConnectData *purple_proxy_connect(void *handle, |
| 275 PurpleAccount *account, |
|
| 276 const char *host, int port, |
|
| 277 PurpleProxyConnectFunction connect_cb, gpointer data); |
|
| 278 |
|
| 279 /** |
|
| 280 * purple_proxy_connect_udp: |
|
| 281 * @handle: A handle that should be associated with this |
|
| 282 * connection attempt. The handle can be used |
|
| 283 * to cancel the connection attempt using the |
|
| 284 * purple_proxy_connect_cancel_with_handle() |
|
| 285 * function. |
|
| 286 * @account: The account making the connection. |
|
| 287 * @host: The destination host. |
|
| 288 * @port: The destination port. |
|
| 289 * @connect_cb: (scope call): The function to call when the connection is |
|
| 290 * established. If the connection failed then |
|
| 291 * fd will be -1 and error message will be set |
|
| 292 * to something descriptive (hopefully). |
|
| 293 * @data: User-defined data. |
|
| 294 * |
|
| 295 * Makes a connection to the specified host and port. Note that this |
|
| 296 * function name can be misleading--although it is called "proxy |
|
| 297 * connect," it is used for establishing any outgoing UDP connection, |
|
| 298 * whether through a proxy or not. |
|
| 299 * |
|
| 300 * Returns: NULL if there was an error, or a reference to an |
|
| 301 * opaque data structure that can be used to cancel |
|
| 302 * the pending connection, if needed. |
|
| 303 */ |
|
| 304 PurpleProxyConnectData *purple_proxy_connect_udp(void *handle, |
|
| 305 PurpleAccount *account, |
275 PurpleAccount *account, |
| 306 const char *host, int port, |
276 const char *host, int port, |
| 307 PurpleProxyConnectFunction connect_cb, gpointer data); |
277 PurpleProxyConnectFunction connect_cb, gpointer data); |
| 308 |
278 |
| 309 /** |
279 /** |