Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gNetworkAddressParse

gNetworkAddressParse


Description

Creates a new GSocketConnectable for connecting to the given hostname and port. May fail and return NULL in case parsing host.and.port fails.

Usage

gNetworkAddressParse(host.and.port, default.port, .errwarn = TRUE)

Arguments

host.and.port

the hostname and optionally a port

default.port

the default port if not in host.and.port

.errwarn

Whether to issue a warning on error or fail silently

Details

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).

If no port is specified in host.and.port then default.port will be used as the port number to connect to.

In general, 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. Since 2.22

Value

A list containing the following elements:

retval

[GSocketConnectable] the new GNetworkAddress, or NULL on error

error

a pointer to a GError, or NULL

Author(s)

Derived by RGtkGen from GTK+ documentation


RGtk2

R Bindings for Gtk 2.8.0 and Above

v2.20.36
GPL
Authors
Michael Lawrence <michafla@gene.com> and Duncan Temple Lang <duncan@wald.ucdavis.edu>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.