pike.git / lib / modules / Stdio.pmod

version» Context lines:

pike.git/lib/modules/Stdio.pmod:1: - // $Id: Stdio.pmod,v 1.39 1999/06/29 16:02:58 mast Exp $ + // $Id: Stdio.pmod,v 1.40 2001/06/13 12:01:27 grubba Exp $      #include <string.h>      inherit files;      class File   {    inherit Fd_ref;       mixed ___read_callback;
pike.git/lib/modules/Stdio.pmod:100:    int async_connect(string host, int port,    function(int, mixed ...:void) callback,    mixed ... args)    {    if (!_fd && !open_socket()) {    // Out of sockets?    return 0;    }    _async_cb = callback;    _async_args = args; + #if constant(files.__HAVE_OOB__) +  set_nonblocking(0, _async_connected, _async_failed, _async_connect, 0); + #else /* !constant(files.__HAVE_OOB__) */    set_nonblocking(0, _async_connected, _async_failed); -  + #endif /* constant(files.__HAVE_OOB__) */    mixed err;    if (err = catch(connect(host, port))) {    // Illegal format. -- Bad hostname?    set_nonblocking(0,0,0);    throw(err);    }    return(1); // OK so far.    }       object(File) pipe(void|int how)