I know that part of why the Close() thing is so tangly is because we need to 
make sure certain packets have been sent before just killing the connection, 
and that some of them might need to wait for a response from the client. So 
it's a difference between Close() as in Dispose() and Close() as in 'shut down 
user connection correctly' afaicanrecall.

 

Also, I think part of the confusion is a somewhat fuzzy diversion of 
responsibility between the client itself and the client manager.

 

Ideally, all core code outside the manager and its clients should ask the 
Client Manager to close a Client correctly (as it should know how to remove 
references to clients, but also to interact with other system management 
resources) - the emptying of queues and actual closing down should probably be 
a private matter for the client class.

 

The Client Thus probably would need to have a 'shutting down' flag, throwing 
non-essential packets, and it would signal to the client manager when it's done 
with its internal closing down work, so the manager can remove the references 
from the system. I believe that can be the origin of the event vs dispose bool. 
Which is ugly as hell, and I'm probably the one to introduce it.
 
Best regards,
Stefan Andersson
Tribal Media AB



 


From: a...@deepthink.com.au
To: opensim-dev@lists.berlios.de
Date: Sun, 22 Feb 2009 02:21:05 -0500
Subject: [Opensim-dev] Refactoring IClientAPI.Close and Friends





Right now, we have four separate close methods for clients, enumerated they are 
(for LLClientView):
 
-          Close(bool circuit)
o   Either fires an event, or closes the connection depending on parameter[!?]
-          Kick(string msg)
o   Asks the client politely to quit. [!?]
-          Stop()
o   Initialises some shutdown cleanup
-          Restart()
o   Undo-‘s the above
-          Terminate()
o   Stops processing packets for the user and removes their entry in the packet 
server
 
I would like to propose changing this into three methods.
 
-          Close(string msg) – Combines Kick, Terminate and Close into one 
method. We need to find out why Close branches onto the event when the 
parameter is true, or closes when false, and streamline it. Kick should 
automatically terminate the connection – there should be no ‘requests’ 
involved, it should be a very straight forward ‘You are the weakest link. 
Goodbye.’
-          Pause() – Equivilent to Stop() as it is now. Function described as 
‘Suspend Packet Processing’
-          Resume() – Equivilent to Restart() as it is now. Function described 
as ‘Resume Packet Processing’
 
Adam
_______________________________________________
Opensim-dev mailing list
Opensim-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/opensim-dev

Reply via email to