[muscle] SV: Re: SV: Re: Server Design issue.

  • From: "David Svanberg" <ds@xxxxxxxxxxx>
  • To: <muscle@xxxxxxxxxxxxx>
  • Date: Mon, 27 Oct 2003 10:05:57 +0100


is there a way to stop the server from a StorageReflectSession object?

I have a client sending a NB_COMMAND_STOP_SERVER message and wants actually
to stop the server when the server gets this message... :)


-----Opprinnelig melding-----
Fra: muscle-bounce@xxxxxxxxxxxxx [mailto:muscle-bounce@xxxxxxxxxxxxx]På;
vegne av Jeremy Friesner
Sendt: 22. oktober 2003 17:54
Til: muscle@xxxxxxxxxxxxx
Emne: [muscle] Re: SV: Re: Server Design issue.

> It should be good if one could do a ServerProcessSingleLoop that runs one
> iteration through the ServerProcessLoop leaving control back to the

That wouldn't work very well, because each iteration through the loop
contains a call to select(), and select() may block for a long period of
(it willl block until the next piece of I/O is ready for processing, or
the next PulseNode event-time has arrived).

> Having the possibility to install a callback function from the
> ServerProcessLoop giving us the chance to interact.

You can get lots of callback hooks by installing a Session object and
overriding some of its methods to do what you want.  (The session
object doesn't have to be connected to a client... you can pass in
socket=3D-1 to indicate there is no connection)


Other related posts:

  • » [muscle] SV: Re: SV: Re: Server Design issue.