decode

fun decode(line: String): LanMessage?

Returns null for malformed or unknown lines instead of throwing — peers are untrusted input.