public UVWriteRequest() { Int32 requestSize = UVIntrop.req_size(UVRequestType.WRITE); var bufferSize = Marshal.SizeOf(typeof(UVIntrop.uv_buf_t)) * QUEUE_SIZE; this.mPins = new GCHandle[QUEUE_SIZE]; CreateMemory(requestSize + bufferSize); this.mBuffer = (UVIntrop.uv_buf_t *)(this.handle + requestSize); }
protected void CreateRequest(UVRequestType type) { CreateMemory(UVIntrop.req_size(type)); }