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 }
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); }
public bool Read(int scene, ref OSCMsg dest) { return(clientToOscBuff[scene].ReadChunk(ref dest)); }
public void Write(ref OSCMsg msg) { oscToClientBuff[msg.scene - 1].WriteChunk(ref msg); }