[DGD] Changing connect() (network package)

Noah Gibbs noah_gibbs at yahoo.com
Wed Dec 12 00:55:43 CET 2007


  Incidentally, there's a really easy, clean way you can get outbound network
connections with vanilla DGD, though it requires writing some non-DGD code.

  Write a simple network server that knows to connect on a particular port (it
will be connecting to your DGD server).  Have a simple control protocol with
the operation "open a new outbound connection to <machine, TCP port>, then
connect back to <port>".  When the server sees the operation, have it fork off
a new process which opens the outbound connection to the given server and port,
opens a socket to the DGD server, and then just copies the data back and forth
from one socket to the other.

  The extra network server must start up when your MUD does, or perhaps when
your machine does.  DGD will look for the inbound connection from the server,
accept it, and then send it an "open connection" operation every time DGD wants
to make an outbound connection.  Then your DGD server will look for the
incoming connection request from the simple server, which is your outbound
connection, even though it looks inbound from the DGD server's perspective.

  This doesn't solve any security problems -- it assumes your DGD server won't
do anything stupid.  But it does supply a simple protocol for outbound
connections which is fully compatible with all versions of plain-vanilla DGD. 
You can't code it up in DGD, but that's also true of the kernel extension being
discussed here.  You *can* code it up in C or Perl.  It requires a bit of
MUDlib support, but not much.  And it should work just fine on pretty much any
DGD version, though it's nicer if you only use recent ones that support
multiple inbound binary ports.

--- Shentino <shentino at gmail.com> wrote:

> According to the docs, calling LPC from the driver is not public.
> 
> However, DGD does it all the time with the driver object, so even if
> it doesn't exist publicly, going to LPC seems like a clean operation
> to figure out.
> 
> When MP comes out, this is going to get complicated in a hurry though...
> ___________________________________________
> https://mail.dworkin.nl/mailman/listinfo/dgd
> 





      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs



More information about the DGD mailing list