public static byte toByte ( Type type ) { switch ( type ) { case SERVER_CONNECT : return 0x01 ; case SERVER_DISCONNECT : return 0x02 ; case SERVER_SET_ATTRIBUTE : return 0x03 ; case CLIENT_UPDATE_DATA : return 0x04 ; case CLIENT_UPDATE_ATTRIBUTE : return 0x05 ; case SERVER_SEND_MESSAGE : return 0x06 ; case CLIENT_SEND_MESSAGE : return 0x06 ; case CLIENT_STATUS : return 0x07 ; case CLIENT_CLEAR_DATA : return 0x08 ; case CLIENT_DELETE_DATA : return 0x09 ; case SERVER_DELETE_ATTRIBUTE : return 0x0A ; case CLIENT_INITIAL_DATA : return 0x0B ; default : log . error ( "Unknown type " + type ) ; return 0x00 ; } }
Convert SO event type to byte representation that RTMP uses