start
Deprecated
Use channel(DeliveryMode.UNRELIABLE).actuate(...) - see the 2.0 channel API
Replace with
import com.spartanlabs.webtools.udp.DeliveryMode
channel(DeliveryMode.UNRELIABLE).actuate(onMessage)Starts the background listener thread (if not already running): receives datagrams on socket until stop is called, drops 0x80 keepalive and 0x81/0x82 probe datagrams silently, and dispatches every 0x90 frame's stripped payload (decoded to text) to onMessage on the single-threaded dispatch executor (never on the listener thread itself), so a slow onMessage cannot stall the read loop.
Call after handshake has succeeded. Idempotent: calling this (or startBytes, or channel(UNRELIABLE).actuate*) again rebinds the unreliable handler rather than starting a second listener thread.
Return
Result.success once the listener thread is running, or the failure that prevented starting it
Parameters
invoked with the decoded text of every non-keepalive datagram; runs on the dispatch executor, not the caller's thread, so it must return quickly. An exception thrown by onMessage is caught, logged, and does not stop the listener or later dispatches.