static void OnAllocCB(IntPtr handle, IntPtr suggested_size, out uv_buf_t buf) { Tcp h = GetDataFromHandle <Tcp>(handle); h.Channel.AllocRecv(out buf); //buf = new uv_buf_t(); //buf = new uv_buf_t(recvGC.AddrOfPinnedObject(), RECV_BUFF_LEN); }
static void OnReadCB(IntPtr handle, IntPtr nread, ref uv_buf_t buf) { Tcp h = NativeHandle.GetDataFromHandle <Tcp>(handle); h.OnReadCB(nread); }
internal static extern int uv_write(IntPtr req, IntPtr handle, ref uv_buf_t bufs, int nbufs, uv_watcher_cb cb);
public WriteRequest(uv_req_type requestType, IntPtr buf, int len) : base(requestType, len) { _buf = new uv_buf_t(buf, len); }
public void AllocRecv(out uv_buf_t buf) { buf = new uv_buf_t(recvGC.AddrOfPinnedObject(), RECV_BUFF_LEN); }