gSocketNewFromFd {RGtk2} | R Documentation

## gSocketNewFromFd

### Description

Creates a new `GSocket` from a native file descriptor or winsock SOCKET handle.

### Usage

    gSocketNewFromFd(fd, .errwarn = TRUE)

### Arguments

``fd`` | a native socket file descriptor.
`.errwarn` | Whether to issue a warning on error or fail silently

### Details

This reads all the settings from the file descriptor so that all properties should work. Note that the file descriptor will be set to non-blocking mode, independent on the blocking mode of the `GSocket`. Since 2.22

### Value

A list containing the following elements:

`retval` | [`GSocket`] a `GSocket` or `NULL` on error.
``error`` | `GError` for error reporting, or `NULL` to ignore.

### Author(s)

Derived by RGtkGen from GTK+ documentation

[Package RGtk2 version 2.20.40 Index]