gSocketConnect: gSocketConnect

Description Usage Arguments Details Value Author(s)

View source: R/gioFuncs.R

Description

Connect the socket to the specified remote address.

Usage

1
gSocketConnect(object, address, cancellable = NULL, .errwarn = TRUE)

Arguments

object

a GSocket.

address

a GSocketAddress specifying the remote address.

cancellable

a GCancellable or NULL

.errwarn

Whether to issue a warning on error or fail silently

Details

For connection oriented socket this generally means we attempt to make a connection to the address. For a connection-less socket it sets the default address for gSocketSend and discards all incoming datagrams from other sources.

Generally connection oriented sockets can only connect once, but connection-less sockets can connect multiple times to change the default address.

If the connect call needs to do network I/O it will block, unless non-blocking I/O is enabled. Then G_IO_ERROR_PENDING is returned and the user can be notified of the connection finishing by waiting for the G_IO_OUT condition. The result of the connection can then be checked with gSocketCheckConnectResult. Since 2.22

Value

A list containing the following elements:

retval

[logical] TRUE if connected, FALSE on error.

error

GError for error reporting, or NULL to ignore.

Author(s)

Derived by RGtkGen from GTK+ documentation


RGtk2 documentation built on Oct. 14, 2021, 5:08 p.m.

Related to gSocketConnect in RGtk2...