protected override void OnMessageDequeue(WebSocketSharp.MessageEventArgs message)
    {
        // statsSumary.AddBytesRecieved(message.RawData.Length);
        OSCPacket oscpacket = OSCPacket.Unpack(message.RawData);

        if (oscpacket.Address == "/message")
        {
            DebugClient("recieved messaget " + oscpacket.GetString(0));
        }
        if (oscpacket != null)
        {
            OnOSCMessage(oscpacket as OSCMessage);
            //	DebugClient("recieved " + oscpacket.Address);
        }
        else
        {
            DebugClient("unpacking osc messge failed " + message.Data);
        }
    }
Exemple #2
0
 public static string GetString(this OSCPacket packet, ref int index)
 {
     index++;
     return(packet.GetString(index - 1));
 }