[Prev][Next][Index][Thread]

# Re: Network output buffer

- Date: Thu, 4 Jan 1996 11:56:28 PST
- From:
- Cc: moo-cows@parc.xerox.com
- Content-Type: text/plain; charset="us-ascii"

    At 11:14 AM 1/4/96 PST, you wrote:
    > for Line in (htext)
    >   notify(player, Line, 1);
    >   if ($command_utils:running_out_of_time())
    >     suspend(0);
    >   endif
    > endfor
    > suspend(1);
    > boot_player(player);

    First off, you are dropping the return value of notify() on the floor
    instead of using it:

    for Line in (htext)
      while (!notify(player, Line, 1))
        suspend(1);
      endwhile
      $command_utils:suspend_if_needed(0);
    endfor

     (see the ChangeLog.txt for specifics on the use of the third argument
       to notify())

    This should push more data out the connection before closing the connection,
    but not all, which is why.....
    You'll also have to come up with your own check to deteremine when the
    buffer is empty and if it's okay to boot the connection.  On E_MOO, I
    suspended for a certain length of time, the amount of time being a function
    of the size of the network buffer (in options.h) and the amount of data I
    put into it.  You can see the code at
    http://tecfa.unige.ch:4243/code/$httpd:notify_connection (note that this
    code hasn't been converted to use 1.7.9's notify() extension, but the length
    of the fork() time in the boot_player could be useful).
    Note that $server_options.network_buffer_size is just where the size is
    stored so the db knows.  Changing it has nothing to do with the buffer's size.

- Prev: Network output buffer
- Next: Re: Network output buffer
- Index: MOO-cows
- Thread: MOO-cows

Home | Subject Index | Thread Index