RGtk2 (version 2.20.31)

gSocketReceiveFrom: gSocketReceiveFrom

Description

Receive data (up to size bytes) from a socket.

Usage

gSocketReceiveFrom(object, size, cancellable = NULL, .errwarn = TRUE)

Arguments

object
size
the number of bytes you want to read from the socket
cancellable
a GCancellable or NULL
.errwarn
Whether to issue a warning on error or fail silently

Value

A list containing the following elements:
retval
[integer] Number of bytes read, or -1 on error
address
a pointer to a GSocketAddress pointer, or NULL
buffer
a buffer to read data into (which should be at least size bytes long).
error
GError for error reporting, or NULL to ignore.

Details

If address is non-NULL then address will be set equal to the source the received packet. See gSocketReceive for additional information. Since 2.22