summaryrefslogtreecommitdiff
path: root/spicemsg.js
diff options
context:
space:
mode:
Diffstat (limited to 'spicemsg.js')
-rw-r--r--spicemsg.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/spicemsg.js b/spicemsg.js
index 0321cc7..3619996 100644
--- a/spicemsg.js
+++ b/spicemsg.js
@@ -1278,3 +1278,21 @@ SpiceMsgDisplayInvalList.prototype =
}
},
}
+
+function SpiceMsgPortInit(a, at)
+{
+ this.from_buffer(a,at);
+};
+
+SpiceMsgPortInit.prototype =
+{
+ from_buffer: function (a, at)
+ {
+ at = at || 0;
+ var dv = new SpiceDataView(a);
+ var namesize = dv.getUint32(at, true); at += 4;
+ var offset = dv.getUint32(at, true); at += 4;
+ this.opened = dv.getUint8(at, true); at += 1;
+ this.name = a.slice(offset, offset + namesize - 1);
+ }
+}