SYNOPSIS
This implements basic capability de/serialization
INSTALL
npm install primea-capability
USAGE
const Capability = const id = Bufferconst cap = id 5
constructor
creates a new capability given the id of the process creating it and a "tag"
Parameters
id
Buffertag
Integer (optional, default0
)
serialize
Serializes the capability
Returns Buffer
deserialize
Deserializes a Buffer and returns a new instance of Capability
Parameters
raw
Buffer
Returns Object
deserializeFromPipe
Deserializes a capability from a buffer-pipe and returns a new instance of Capability
Parameters
p
Pipe
Returns Object