Example #1
0
        public static pollfd Deserialize(ByteBufferRef buf, int offset)
        {
            Contract.Assert(offset >= 0 && offset + Size <= buf.Length);
            pollfd res;

            res.fd      = Deserializer.ReadInt(buf, offset);
            res.events  = Deserializer.ReadShort(buf, offset + sizeof(int));
            res.revents = Deserializer.ReadShort(buf, offset + sizeof(int) + sizeof(short));
            return(res);
        }