| // Copyright 2015 The Vanadium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| "v.io/x/ref/runtime/internal/lib/iobuf" |
| "v.io/x/ref/runtime/internal/rpc/stream/id" |
| // Data encapsulates an application data message. |
| VCI id.VC // Must be non-zero. |
| // Close returns true if the sender of the data message requested that the flow be closed. |
| func (d *Data) Close() bool { return d.flags&0x1 == 1 } |
| // SetClose sets the Close flag of the message. |
| func (d *Data) SetClose() { d.flags |= 0x1 } |
| // Release releases the Payload |
| func (d *Data) Release() { |
| func (d *Data) PayloadSize() int { |
| func (d *Data) String() string { |
| return fmt.Sprintf("VCI:%d Flow:%d Flags:%02x Payload:(%d bytes)", d.VCI, d.Flow, d.flags, d.PayloadSize()) |