Expand/Shrink

nopoll_msg_opcode_desc

Definition: include nopoll.e

string desc = nopoll_msg_opcode_desc(integer opcode)
Description: Get a human readable version of a result from nopoll_msg_opcode().

opcode: The integer opcode from a nopoll_msg_opcode() call.

Returns: A human readable string, one of:
"NOPOLL_UNKNOWN_OP_CODE"
"NOPOLL_CONTINUATION_FRAME"
"NOPOLL_TEXT_FRAME"
"NOPOLL_BINARY_FRAME"
"NOPOLL_CLOSE_FRAME"
"NOPOLL_PING_FRAME"
"NOPOLL_PONG_FRAME"

You can of course use those constants, without the quotes, to test opcode directly (rather than desc=="<string>").
See Also: nopoll_msg_opcode