~ubuntu-branches/ubuntu/trusty/glibmm2.4/trusty

« back to all changes in this revision

Viewing changes to gio/giomm/socketclient.h

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2012-09-28 12:28:45 UTC
  • mfrom: (1.2.77)
  • Revision ID: package-import@ubuntu.com-20120928122845-6h032jivploan2aa
Tags: 2.33.13-0ubuntu2
* debian/rules:
  - Bump shlib version

Show diffs side-by-side

added added

removed removed

Lines of Context:
245
245
   * @return A SocketConnection on success, <tt>0</tt> on error.
246
246
   */
247
247
  Glib::RefPtr<SocketConnection> connect(const Glib::RefPtr<SocketConnectable>& connectable, const Glib::RefPtr<Cancellable>& cancellable);
248
 
Glib::RefPtr<SocketConnection> connect(const Glib::RefPtr<SocketConnectable>& connectable);
 
248
 
 
249
  /// A connect() convenience overload.
 
250
  Glib::RefPtr<SocketConnection> connect(const Glib::RefPtr<SocketConnectable>& connectable);
249
251
 
250
252
  
251
253
  /** This is a helper function for g_socket_client_connect().
287
289
   */
288
290
  Glib::RefPtr<SocketConnection> connect_to_host(const Glib::ustring& host_and_port, guint16 default_port, const Glib::RefPtr<Cancellable>& cancellable);
289
291
 
290
 
  /** This is a helper function for connect().
291
 
   * This attempts to create a TCP connection to the named host.
292
 
   *
293
 
   * @a host_and_port may be in any of a number of recognised formats; an IPv6 address, an IPv4 address, or a domain name (in which case a DNS lookup is performed). Quoting with [] is supported for all address types. A port override may be specified in the usual way with a colon. Ports may be given as decimal numbers or symbolic names (in which case an /etc/services lookup is performed).
294
 
   *
295
 
   * If no port override is given in @a host_and_port then default_port will be used as the port number to connect to.
296
 
   * 
297
 
   * In general, @a host_and_port is expected to be provided by the user (allowing them to give the hostname, and a port overide if necessary) and default_port is expected to be provided by the application.
298
 
   *
299
 
   * In the case that an IP address is given, a single connection attempt is made. In the case that a name is given, multiple connection attempts may be made, in turn and according to the number of address records in DNS, until a connection succeeds.
300
 
   *
301
 
   * Upon a successful connection, a new SocketConnection is constructed and returned. 
302
 
   *
303
 
   * In the event of any failure (DNS error, service not found, no hosts connectable) an exception is thrown.
304
 
   *
305
 
   * @param host_and_port The name and optionally port of the host to connect to.
306
 
   * @param default_port The default port to connect to.
307
 
   */
 
292
  /// A connect_to_host() convenience overload.
308
293
  Glib::RefPtr<SocketConnection> connect_to_host(const Glib::ustring& host_and_port, guint16 default_port);
309
294
 
310
295
  
328
313
   * @return A SocketConnection if successful, or <tt>0</tt> on error.
329
314
   */
330
315
  Glib::RefPtr<SocketConnection> connect_to_service(const Glib::ustring& domain, const Glib::ustring& service, const Glib::RefPtr<Cancellable>& cancellable);
331
 
Glib::RefPtr<SocketConnection> connect_to_service(const Glib::ustring& domain, const Glib::ustring& service);
 
316
 
 
317
  /// A connect_to_service() convenience overload.
 
318
  Glib::RefPtr<SocketConnection> connect_to_service(const Glib::ustring& domain, const Glib::ustring& service);
332
319
 
333
320
  
334
321
  /** This is a helper function for g_socket_client_connect().
361
348
   */
362
349
  Glib::RefPtr<SocketConnection> connect_to_uri(const Glib::ustring& uri, guint16 default_port, const Glib::RefPtr<Cancellable>& cancellable);
363
350
 
364
 
  /** This is a helper function for connect().
365
 
   * This attempts to create a TCP connection with a network URI.
366
 
   *
367
 
   * @a uri may be any valid URI containing an "authority" (hostname/port) component. If a port is not specified in the URI, default_port will be used. TLS will be negotiated if "tls" is true. (GSocketClient does not know to automatically assume TLS for certain URI schemes.)
368
 
   *
369
 
   * Using this rather than connect() or connect_to_host() allows SocketClient to determine when to use application-specific proxy protocols.
370
 
   *
371
 
   * Upon a successful connection, a new SocketConnection is constructed and returned.
372
 
   *
373
 
   * In the event of any failure (DNS error, service not found, no hosts connectable) an exception is thrown.
374
 
   *
375
 
   * @param uri A network URI
376
 
   * @param default_port The default port to connect to.
377
 
   */
 
351
  /// A connect_to_uri() convenience overload.
378
352
  Glib::RefPtr<SocketConnection> connect_to_uri(const Glib::ustring& uri, guint16 default_port);
379
353
 
380
354