gSocketListenerAddAddress: gSocketListenerAddAddress

Description Usage Arguments Details Value Author(s)

View source: R/gioFuncs.R

Description

Creates a socket of type type and protocol protocol, binds it to address and adds it to the set of sockets we're accepting sockets from.

Usage

1
2
gSocketListenerAddAddress(object, address, type, protocol, source.object = NULL,
    .errwarn = TRUE)

Arguments

object

a GSocketListener

address

a GSocketAddress

type

a GSocketType

protocol

a GSocketProtocol

source.object

Optional GObject identifying this source

.errwarn

Whether to issue a warning on error or fail silently

Details

Note that adding an IPv6 address, depending on the platform, may or may not result in a listener that also accepts IPv4 connections. For more determinstic behaviour, see gSocketListenerAddInetPort. source.object will be passed out in the various calls to accept to identify this particular source, which is useful if you're listening on multiple addresses and do different things depending on what address is connected to.

If successful and effective.address is non-NULL then it will be set to the address that the binding actually occured at. This is helpful for determining the port number that was used for when requesting a binding to port 0 (ie: "any port"). This address, if requested, belongs to the caller and must be freed. Since 2.22

Value

A list containing the following elements:

retval

[logical] TRUE on success, FALSE on error.

effective.address

location to store the address that was bound to, or NULL.

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.