MOO-cows Mailing List Archive

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

Re: 'notify() is not consistent'



>         Currently, I am having problems in writing to Netscape from MOO's
> notify(). 'player:tell()' does not seem to work at all.
> 
>         The problem is for the same 100 lines of strings, I send to both MOO
> player and Netscape Navigator.
> 
>         for each line
>           notify(player, lines);
>           notify(netscape, lines);
>         endfor
> 
>         These lines are repeated many times. I got the correct content from
> player but not from browser as viewed by 'View'-'Source Document' command in
> the Netscape Nevigator. Browser chopped off some lines. 
> 
>         The chopping is not consistent. If I use, <MAP> and <IMG SRC> tags
> of HTML, it is like to chop off earlier. However, if I use other tags, like
> <A HRef>, it may chop off few hundred lines later.
> 
>         Does anyone encounter the same problem above ? Please kindly share
> with me.
> 

You need to handle buffer overflow and use the optional third argument to notify.
How do this is documented in both the changelog and in the programmer's manual.

Essentially, you specifiy a true third arg, and you examine the return value of notify.
This return value tells you if the value fit in the output buffer, if it didn't,
the string didn't get pushed out the connection, so you'll need to suspend for a few seconds
to wait until the buffer empties a bit, and then renotify the string.

Andy.



References:

Home | Subject Index | Thread Index