🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #37210

Re: extension question

#37210
From: Kyle Marvin
Date: Thu, 22 Feb 1990 14:21
43 lines
2121 bytes
> Is it "within X philosophy" to create an extension
> that allocates memory on a "per-client" basis?

Can't vouch for the philosophical implications, but
we implement an extension which requires that data
structures be maintained on a "per-client" basis.
Seems like this is a *reasonable* thing to do.

> If so, is there a "standard" extensible way to
> have the server call your extension if the client
> connection goes down? (CloseDownClient).

Again, can't presume to offer the "standard" solution,
but here's something which works for us.  Upon first
contact with a client, create an extension specific
resource (see AddResource()) associated with the client.
For the data associated with the resource, store the
index of the client (pClient->index) or something else
which allows you to identify it.  Then associate your
own "delete" handler for the resource class and type
with the resource.  This "delete" handler will be
invoked whenever the client is shut down (and be
passed the client index you stored in AddResource().)
Do all your client-specific cleanup there.  The mechanisms
for doing this vary slightly between R3 and R4 due to
changes in the server resource handling.  If you need
more specifics, E-mail direct to me.

> Anyone out there make per-client-allocating
> extensions that clean-up after themselves
> without a server modification.

Yep, see above.  The solution above at least does not
require any changes to dix code.

>				-Dana

Kyle Marvin
Visual Information Technologies, Inc. (VITec)
UUCP: uunet!convex!vitsun!marvin
************************************************************
All men are moral.  Only their neighbors are not.  (Steinbeck)
************************************************************
Technical Details
Message-ID: <9002221421.AA17295@kelly.com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!yale!mintaka!bloom-beacon!kelly.UUCP!marvin

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!yale!mintaka!bloom-beacon!kelly.UUCP!marvin
From: marvin@kelly.UUCP (Kyle Marvin)
Newsgroups: comp.windows.x
Subject: Re:  extension question
Message-ID: <9002221421.AA17295@kelly.com>
Date: 22 Feb 90 14:21:40 GMT
Sender: daemon@athena.mit.edu (Mr Background)
Organization: The Internet
Lines: 43