예제 #1
0
        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);
        }
예제 #2
0
        static void OnReadCB(IntPtr handle, IntPtr nread, ref uv_buf_t buf)
        {
            Tcp h = NativeHandle.GetDataFromHandle <Tcp>(handle);

            h.OnReadCB(nread);
        }
예제 #3
0
 internal static extern int uv_write(IntPtr req, IntPtr handle, ref uv_buf_t bufs, int nbufs, uv_watcher_cb cb);
예제 #4
0
 public WriteRequest(uv_req_type requestType, IntPtr buf, int len) : base(requestType, len)
 {
     _buf = new uv_buf_t(buf, len);
 }
예제 #5
0
 public void AllocRecv(out uv_buf_t buf)
 {
     buf = new uv_buf_t(recvGC.AddrOfPinnedObject(), RECV_BUFF_LEN);
 }