Learn R Programming

RGtk2 (version 2.20.31)

gSocketNewFromFd: 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

Value

A list containing the following elements:
retval
[GSocket] a GSocket or NULL on error.
error
GError for error reporting, or NULL to ignore.

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