[DGD] Writing an external network daemon

Shentino shentino at gmail.com
Sun Jul 26 16:43:38 CEST 2009


On Sun, Jul 26, 2009 at 7:40 AM, Noah Gibbs <noah_gibbs at yahoo.com> wrote:

>  I think telnet protocol defaults to line-mode, so yes, it'll give you the
> predictable behavior you want, but that's all done at the LPC level.


<pedant>
Actually, DGD handles the telnet linemode buffering internally.

Having a klib binary connection in telnet mode is where the LPC comes in.
</pedant>


> Fundamentally, network data gets broken up at arbitrary points, and only
> re-buffering at the final destination can change that (by faking
> continuity).  You can't keep TCP/IP from breaking these things up for you,
> you can only put them back together afterward.


Noah has this nailed.

You should make NO assumptions about how things get buffered or fragmented.

>
>
> --- On Sun, 7/26/09, Petter Nyström <jimorie at gmail.com> wrote:
>
> > From: Petter Nyström <jimorie at gmail.com>
> > Subject: Re: [DGD] Writing an external network daemon
> > To: "All about Dworkin's Game Driver" <dgd at dworkin.nl>
> > Date: Sunday, July 26, 2009, 7:33 AM
> > Ah.
> >
> > Yes, that makes sense. Thanks for clarifying. However, I
> > am
> > experimenting some now, and I'm not sure what I should be
> > able to
> > expect from DGD's buffering. I am using binary connections,
> > and If I
> > send the string "123" back to the MUD via my external
> > daemon, I most
> > of the times receive the string "123". But sometimes I get
> > three
> > consecutive calls to receive_message() with "1", "2" and
> > "3",
> > respectively. Or any variation thereof. I guess I should be
> > using the
> > telnet protocol if I want a more predictable behaviour?
> >
> > Also not using any multiplexing, either.
> >
> > Regards,
> >
> > Jimorie
> >
> > On Sun, Jul 26, 2009 at 4:23 PM, Felix A. Croes<felix at dworkin.nl>
> > wrote:
> > > <jimorie at gmail.com>
> > wrote:
> > >
> > >>[...]
> > >> But you don't have any thoughts on how you would
> > control the flow
> > >> going back to receive_message() of the connected
> > objects? (If you did,
> > >> I apologize and ask that you repeat them in
> > simpler terms. :P)
> > >
> > > Easiest would be not to do any multiplexing.  Let the
> > external
> > > network thingy open a new connection to DGD for every
> > "outbound"
> > > connection.  Then those connections could be binary
> > or telnet mode,
> > > with the appropriate buffering handled automatically
> > by DGD.
> > >
> > > Regards,
> > > Felix Croes
> > > ___________________________________________
> > > https://mail.dworkin.nl/mailman/listinfo/dgd
> > >
> > ___________________________________________
> > https://mail.dworkin.nl/mailman/listinfo/dgd
> >
>
>
>
> ___________________________________________
> https://mail.dworkin.nl/mailman/listinfo/dgd
>



More information about the DGD mailing list