Repository navigation
OnlyWorlds Unity SDK 0.29.0
OWLinkListener hands over a link as it was received, beside its reading, and its dispatch can turn a link down by
returning false instead of throwing; OWMainThread.TryRun queues work without throwing when no pump is installed.
A minor release because it adds public API (below).
Added
OWLinkListenerhas a second constructor,(port, Action<OWAddressReading, string> onLink, Func<Action, bool> dispatch = null, timeoutMs).onLinkgets the line as received beside its reading, its line ending stripped: what
a paste of the link would carry. It is kept for readings that cannot be written back as an address, such as a site
address that names its world by slug. The dispatch can decline by returning false, and the sender hears
refused no_receiver, as it does when a dispatch throws. Before this, throwing was the only way to refuse. The
default dispatch isOWMainThread.TryRun. The first constructor is unchanged.OWMainThread.TryRun(action): queues asRundoes and returns true, or returns false with nothing queued when
no pump is installed or the action is null.Runstill throws in that case.