Example #1
0
        public void WriteChunk(ref OSCMsg msg)
        {
            byte[] data      = msg.ToBytes();
            int    cur_wrPtr = wrPtr;

            foreach (byte b in data)
            {
                cur_wrPtr = Put(b, cur_wrPtr);
            }
            wrPtr = cur_wrPtr;                  // finalizza IN SOLIDO il chunk appena letto
        }
Example #2
0
        public bool ReadChunk(ref OSCMsg dest)
        {
            if (rdPtr != wrPtr)
            {
                byte[] buff = new byte[OSCMsg.Size];
                for (int k = 0; k < buff.Length; k++)
                {
                    buff[k] = Get();
                }
                dest.FromBytes(buff);
                return(true);
            }

            return(false);
        }
Example #3
0
 public bool Read(int scene, ref OSCMsg dest)
 {
     return(clientToOscBuff[scene].ReadChunk(ref dest));
 }
Example #4
0
 public void Write(ref OSCMsg msg)
 {
     oscToClientBuff[msg.scene - 1].WriteChunk(ref msg);
 }