public static void Receive(SafeRioRequestQueueHandle queue, IntPtr buffers, int bufferCount, uint flags, IntPtr requestContext) { Debug.Assert(!queue.IsInvalid); if (!s_rioReceive(queue, buffers, bufferCount, flags, requestContext)) { throw new SocketException(); } }
public RegisteredSocket(RegisteredMultiplexer multiplexer, Socket socket) { lock (multiplexer.SafeHandle) { _requestQueue = Interop.Rio.CreateRequestQueue(socket.SafeHandle, multiplexer.SafeHandle, IntPtr.Zero, 1, 1, 1, 1); } _socket = socket; }
public static SafeRioRequestQueueHandle CreateRequestQueue(SafeSocketHandle socket, SafeRioCompletionQueueHandle completionQueue, IntPtr context, uint maxOutstandingReceive, uint maxReceiveDataBuffers, uint maxOutstandingSend, uint maxSendDataBuffers) { Debug.Assert(!socket.IsInvalid); Debug.Assert(!completionQueue.IsInvalid); SafeRioRequestQueueHandle queue = s_rioCreateRequestQueue(socket, maxOutstandingReceive, maxReceiveDataBuffers, maxOutstandingSend, maxSendDataBuffers, completionQueue, completionQueue, context); if (queue.IsInvalid) { throw new SocketException(); } queue.SetDependencies(socket, completionQueue); return(queue); }