Exemplo n.º 1
0
        public static void SetOption(this IZmqSocket source, SocketOpt option, byte[] buffer)
        {
            if (buffer == null)
            {
                throw new ArgumentNullException("buffer");
            }

            source.SetOption <byte[]>((int)option, buffer);
        }
Exemplo n.º 2
0
        public static void SetOption(this IZmqSocket source, SocketOpt option, string value)
        {
            if (value == null)
            {
                throw new ArgumentNullException("value");
            }

            source.SetOption <string>((int)option, value);
        }
Exemplo n.º 3
0
        public static void Bind(this IZmqSocket source, Transport transport, string address, uint port, int timeout = Socket.InfiniteTimeout)
        {
            var endpoint = BuildEndpoint(transport, address, port);

            if (timeout != Socket.InfiniteTimeout)
            {
                source.SetOption(SocketOpt.RCVTIMEO, timeout);
            }

            source.Bind(endpoint);
        }
Exemplo n.º 4
0
 public static void SetOption(this IZmqSocket source, SocketOpt option, Int64 value)
 {
     source.SetOption <Int64>((int)option, value);
 }
Exemplo n.º 5
0
 public static void SetOption(this IZmqSocket source, SocketOpt option, int value)
 {
     source.SetOption <int>((int)option, value);
 }