Class Messages
Reading a native message handle and releasing it.
public static class Messages
- Inheritance
-
Messages
- Inherited Members
Methods
Milliseconds(TimeSpan)
Converts a receive time limit to the whole milliseconds a native call takes.
public static ulong Milliseconds(TimeSpan timeout)
Parameters
timeoutTimeSpanThe time limit, rounded up to the next millisecond.
Returns
- ulong
The milliseconds.
Exceptions
- ArgumentOutOfRangeException
The time limit is negative.
Take(nint)
Copies a message out and releases the handle.
public static TransportMessage? Take(nint message)
Parameters
messagenintThe handle, or null when nothing arrived.
Returns
- TransportMessage
The message, or
nullwhen the handle was null.
TimedOut(TimeSpan)
Builds the exception a receive throws when its time runs out.
public static TimeoutException TimedOut(TimeSpan timeout)
Parameters
timeoutTimeSpanThe time limit that ran out.
Returns
- TimeoutException
The exception.