IReceivingSocket.cs 702 B

12345678910111213141516171819
  1. using System;
  2. namespace NetMQ
  3. {
  4. /// <summary>
  5. /// Defines a socket from which message data may be read.
  6. /// </summary>
  7. public interface IReceivingSocket
  8. {
  9. /// <summary>
  10. /// Receive a message if one is available within <paramref name="timeout"/>.
  11. /// </summary>
  12. /// <param name="msg">An object to receive the message's data into.</param>
  13. /// <param name="timeout">The maximum length of time to wait for a message. If <see cref="TimeSpan.Zero"/>, no
  14. /// wait occurs.</param>
  15. /// <returns><c>true</c> if a message was received, otherwise <c>false</c>.</returns>
  16. bool TryReceive(ref Msg msg, TimeSpan timeout);
  17. }
  18. }