private static int _CalculateSize(UvHandleType handleType) { return(Libuv.uv_handle_size(handleType).ToInt32()); }
/// <inheritdoc/> protected UvNetworkStream(UvLoop loop, UvHandleType handleType) : base(loop, handleType) { }
/// <summary> /// Initializes a new instance of libuv handle object. /// </summary> /// <param name="loop">Loop, on which this handle will be initialized.</param> /// <param name="handleType">Type of the handle.</param> protected UvHandle(UvLoop loop, UvHandleType handleType) : base(_CalculateSize(handleType), _GetLoopThreadId(loop)) { this.HandleType = handleType; this.Loop = loop; }
internal UVStream(Loop loop, UvHandleType type) : this(loop, UV.Sizeof(type)) { }
internal Handle(Loop loop, UvHandleType type) : this(loop, UV.Sizeof(type)) { }
internal static int Sizeof(UvHandleType type) { return uv_handle_size(type); }
internal static extern int uv_handle_size(UvHandleType type);
internal static IntPtr Alloc(UvHandleType type) { return Alloc(Sizeof(type)); }
internal Listener(Loop loop, UvHandleType type) : base(loop, type) { DefaultBacklog = 128; listen_cb = listen_callback; }
public static extern IntPtr uv_handle_size(UvHandleType type);
internal static IntPtr Alloc(UvHandleType type) { return(Alloc(Sizeof(type))); }
internal static int Sizeof(UvHandleType type) { return(uv_handle_size(type)); }