DealerSocket.cs 1.3 KB

123456789101112131415161718192021222324252627282930
  1. using NetMQ.Core;
  2. namespace NetMQ.Sockets
  3. {
  4. /// <summary>
  5. /// A DealerSocket is a NetMQSocket, whereby the dealer sends messages in a way intended to achieve load-balancing
  6. /// - which are received in a fair queueing manner.
  7. /// </summary>
  8. public class DealerSocket : NetMQSocket
  9. {
  10. /// <summary>
  11. /// Create a new DealerSocket and attach socket to zero or more endpoints.
  12. /// </summary>
  13. /// <param name="connectionString">List of NetMQ endpoints, separated by commas and prefixed by '@' (to bind the socket) or '>' (to connect the socket).
  14. /// Default action is connect (if endpoint doesn't start with '@' or '>')</param>
  15. /// <example><code>var socket = new DealerSocket(">tcp://127.0.0.1:5555,@tcp://127.0.0.1:55556");</code></example>
  16. public DealerSocket(string? connectionString = null) : base(ZmqSocketType.Dealer, connectionString, DefaultAction.Connect)
  17. {
  18. }
  19. /// <summary>
  20. /// Create a new DealerSocket based upon the given SocketBase.
  21. /// </summary>
  22. /// <param name="socketHandle">the SocketBase to create the new socket from</param>
  23. internal DealerSocket(SocketBase socketHandle)
  24. : base(socketHandle)
  25. {
  26. }
  27. }
  28. }