if (sockares == null)
throw new ArgumentException ("Invalid IAsyncResult", argName);
if (Interlocked.CompareExchange (ref sockares.EndCalled, 1, 0) == 1)
- throw InvalidAsyncOp (methodName);
+ throw new InvalidOperationException (methodName + " can only be called once per asynchronous operation");
return sockares;
}
[MethodImplAttribute(MethodImplOptions.InternalCall)]
internal static extern void cancel_blocking_socket_operation (Thread thread);
- Exception InvalidAsyncOp (string method)
- {
- return new InvalidOperationException (method + " can only be called once per asynchronous operation");
- }
-
[MethodImplAttribute(MethodImplOptions.InternalCall)]
internal static extern void socket_pool_queue (SocketAsyncCallback d, SocketAsyncResult r);
}