Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.os.vms    |    DEC's VAX* line of computers & VMS.    |    264,096 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 263,365 of 264,096    |
|    =?UTF-8?Q?Arne_Vajh=C3=B8j?= to All    |
|    Re: PZMQ    |
|    18 Sep 25 20:21:51    |
   
   From: arne@vajhoej.dk   
      
   On 9/13/2025 6:43 PM, Arne Vajhøj wrote:   
   > On 9/13/2025 5:58 PM, Lawrence D’Oliveiro wrote:   
   >> On Sat, 13 Sep 2025 10:07:28 -0400, Arne Vajhøj wrote:   
   >>> ctx := zmq_ctx_new;   
   >>> s := zmq_socket(ctx, ZMQ_REQ);   
   >>> zmq_connect(s, 'tcp://localhost:10000');   
   >>   
   >> Are errors automatically signalled?   
   >   
   > No.   
   >   
   > It returns an integer with status.   
   >   
   > I just didn't test on it.   
      
   Note that the detailed error is not in the return value   
   but in errno.   
      
   So I had to add support for that (and had a few issues   
   along the way, because I messed up a free call).   
      
   Instead of:   
      
    retval := zmq_connect(s, addr);   
    if retval <> 0 then begin   
    writeln('error');   
    end;   
      
   it is now possible to do:   
      
    retval := zmq_connect(s, addr);   
    if retval <> 0 then begin   
    e := errno;   
    writeln(strerror(e));   
    end;   
      
   or even:   
      
    retval := zmq_connect(s, addr);   
    if retval <> 0 then begin   
    e := errno;   
    if e <> EVMSERR then begin   
    writeln(strerror(e));   
    end else begin   
    e := vmserrno;   
    writeln(strvmserror(e));   
    end;   
    end;   
      
   Arne   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca