Spout.receiver:bind

From GiderosMobile
Revision as of 00:20, 13 November 2026 by MoKaLux (talk | contribs) (Created page with "__NOTOC__ '''Available since:''' Gideros 2019.5<br/> '''Class:''' Spout<br/> === Description === Connects the receiver to a sender, and reports the sender's real name and...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Available since: Gideros 2019.5
Class: Spout

Description

Connects the receiver to a sender, and reports the sender's real name and size.

(bool), (string), (number), (number) = receiver:bind(name, active)

Connecting to a name that is not running returns false; call it again later. This method re-creates Gideros' internal GL textures, so use it when connecting or switching sender rather than every frame.

Parameters

name: (string) the sender to connect to
active: (boolean) when true, Spout ignores "name" and connects to the sender currently flagged as active on the machine. Pass false to connect to the given name. Optional, default = false

Return values

Returns (boolean) true if the connection succeeded
Returns (string) the name of the sender that was actually connected
Returns (number) the sender width
Returns (number) the sender height