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

# Re: Binary IO

- Date: Sat, 27 Jan 1996 09:49:48 PST
- From:
- cc: dave@ipac.caltech.edu, moo-cows.PARC@xerox.com
- Content-Transfer-Encoding: 7bit
- Content-Type: text/plain; charset=us-ascii
- References: <199601271738.MAA14236@vortex.weather.brockport.edu>

    Chuck Adams wrote:
    >
    > > How do I do this?  Right now, I'm digging through the ChangeLog, looking for
    > > some way to change the size of the output buffer.
    > >
    >
    > It's in options.h, and you have to recompile the server for this.

    I was actually looking for an in-database way to do it.  I fixed the code to do
    something like (I'm not logged in so I can't see the actual code I wrote)

    set_connection_option(connection, "binary", 1);
    set_connection_option(player, "binary", 1);
    page = encode_binary("");
    while (typeof(line = read(connection)) != ERR)
      page = page + line;
    endwhile
    while ((l=length(page)) > 0)
      space = output_buffer_length() - output_buffer_length(player);
      if (space == 0)
        suspend(0);
      elseif (l > space)
        part = page[1..space];
        page = page[space+1..$];
        notify(player, part);
        suspend(0);
      else
        notify(player, page);
        page = encode_binary("");
      endif
    endwhile
    boot_player(player);

    That works, although as I said, it was slow.  If I end up using the proxy
    regularly (I'm waiting for the OK from the owner of the computer and the people
    in the network that the computer is on before I use it), I'll hack up a faster
    way to do it.

    Phantom

References:

- Re: Binary IO

- From: cadams@weather.brockport.edu (Chuck Adams)

- Prev: Re: Binary IO
- Next: Re: Binary IO
- Index: MOO-cows
- Thread: MOO-cows

Home | Subject Index | Thread Index