Re: MCCP through Copyover

From: StormeRider (silk@ici.net)
Date: 07/10/00


On Mon, 10 Jul 2000, Patrick Dughi wrote:

> >
> >         SET_BIT(DESC_FLAGS(d), DESC_CANZLIB);
> >
> >         /* Write something, and check if it goes error-free */
> >         if (write_to_descriptor (desc, buf, strlen(buf)) < 0)
> >         {
> >            close_socket (d); /* nope */
> >            continue;
> >         }
> >
> > So it is creating the Circle descriptor before sending to the raw file
> > descriptor. Is this a bad idea? I understand that you want to get rid of
> > file descriptors that aren't valid anymore as soon as possible, but...
> > Is this just for performance reasons or are there other good ideas for
> > doing this?
>
>         Well, you realize that when you do the execl(), your file
> descriptors (among other things) are transfered to the new running
> instance.  They have already been inited/etc so far as the connection
> goes, and directly writing to them is no problem.
>

Right, but if you directly write to the descriptor when the client thinks
that you're still operating in a compressed stream, then you REALLY
confuse the client. :)

>         However, since you already have the descriptor, there's
> nothing that would stop you from doing it in the order you want.  It was
> probably done in this way so one wouldn't allocate the memory for a
> descriptor/player/etc if the connection has died (because then it would
> all have to be freed).
>
>                                         PjD
>
>

Gotcha. This is what I thought, I just needed to double-check.

--
StormeRider
Creator of Winds of Storm,      mudhosters.net:4008
Head Coder of The Last Sunrise, thelastsunrise.net:9000


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT