the peer, or -1 on error
Socket.receiveFrom
ptrdiff_t receiveFrom(out gio.socket_address.SocketAddress address, ref ubyte[] buffer, gio.cancellable.Cancellable cancellable = null)Receive data (up to size bytes) from a socket.
If address is non-null then address will be set equal to the source address of the received packet. address is owned by the caller.
See [gio.socket.Socket.receive] for additional information.
Parameters
address | a pointer to a #GSocketAddress pointer, or null |
buffer | a buffer to read data into (which should be at least size bytes long). |
cancellable | a [gio.cancellable.Cancellable] or null |
Returns
Number of bytes read, or 0 if the connection was closed by
Throws
[ErrorWrap]