public PutBytesClient(Pebble pebble, uint index, PutBytesType transferType, byte[] buffer) { pebble_ = pebble; index_ = index; transferType_ = transferType; buffer_ = buffer; state_ = PutBytesState.NotStarted; token_ = 0; left_ = 0; }
void PutBytes(byte[] data, int index, PutBytesType type) { if (putBytesState != PutBytesState.NotStarted) { // Probably not the best way to handle this, should look up mutex locks or somesuch. throw new InvalidOperationException("PUTBYTES operation in progress."); } putBytesBuffer = new byte[data.Count()]; data.CopyTo(putBytesBuffer, 0); }
public PutBytesMessage(PutBytesType type) : base(Constants.P3bbleEndpoint.PutBytes) { }