MOO-cows Mailing List Archive

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

Re: Network output buffer



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.




Home | Subject Index | Thread Index