epoll_data class

Hack to get make epoll_event work with dart FFI.

epoll_event has attribute((packed)) on i386 and amd64, so the struct is 12-bytes large there. on arm 32-bit and 64-bit it's 16-bytes always.

Let's specify @ffi.Packed(1) unconditionally, but instead of making the first events field a Uint32, we make it a union: union { uint32_t events; uint64_t padding; // for arm 32-bit and 64-bit uint32_t padding; // for x86 and x86_64 }

Only thing we need to look out for is the offsets still matching.

Inheritance
Annotations

Constructors

epoll_data()

Properties

fd int
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
ptr Pointer<Void>
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
u32 int
getter/setter pair
u64 int
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited