Public Types | |
enum | Status { NotStarted, AcceptingConnections, Paused, ShuttingDown, Stopped, Indeterminate } |
Public Member Functions | |
virtual | ~IServerControl () |
Instances of this interface can be deleted by their users. | |
virtual void | Start ()=0 |
virtual void | StartAcceptingConnections ()=0 |
virtual void | StopAcceptingConnections ()=0 |
virtual void | BeginShutdown ()=0 |
Starts the shutdown process and returns immediately. | |
virtual void | WaitForShutdownToComplete ()=0 |
Initiates a shutdown (if one isn't already in progresss) and then waits for it to complete. Does not return until the shutdown has completed. | |
virtual bool | WaitForShutdownToComplete (Milliseconds timeout)=0 |
Initiates a shutdown (if one isn't already in progresss) and then waits for the supplied number of milliseconds for it to complete. Returns true if the shutdown completed successfully before the timeout expired and false if it didn't. | |
virtual void | ForceShutdown ()=0 |
If a shutdown is hung due to sockets still being active then you can force a shutdown to complete by calling this function. Note: USE WITH CARE!!! The usual usage pattern is to call WaitForShutdownToComplete() with a timeout and if that fails then to call ForceShutdown() to allow the object in question to be destroyed (in general the object would call WaitForShutdownToComplete() in its destructor and hang there!). | |
virtual Status | GetStatus () const =0 |
Returns the status of the server. | |
Static Public Member Functions | |
static JetByteTools::Core::_tstring | GetStatusAsString (Status status) |
enum Status |
virtual ~IServerControl | ( | ) | [virtual] |
Instances of this interface can be deleted by their users.
virtual void Start | ( | ) | [pure virtual] |
virtual void StartAcceptingConnections | ( | ) | [pure virtual] |
virtual void StopAcceptingConnections | ( | ) | [pure virtual] |
virtual void BeginShutdown | ( | ) | [pure virtual] |
Starts the shutdown process and returns immediately.
Implemented in TDatagramSocketServer, CNamedServerCollection, CServerCollection, TStreamSocketServer, TStreamSocketServerEx, and TStreamSocketServerEx< TStreamSocketConnectionManager< CFilteringStreamSocketConnectionManagerBase > >.
virtual void WaitForShutdownToComplete | ( | ) | [pure virtual] |
Initiates a shutdown (if one isn't already in progresss) and then waits for it to complete. Does not return until the shutdown has completed.
Implemented in TDatagramSocketServer, CNamedServerCollection, CServerCollection, TStreamSocketServer, TStreamSocketServerEx, and TStreamSocketServerEx< TStreamSocketConnectionManager< CFilteringStreamSocketConnectionManagerBase > >.
virtual bool WaitForShutdownToComplete | ( | Milliseconds | timeout | ) | [pure virtual] |
Initiates a shutdown (if one isn't already in progresss) and then waits for the supplied number of milliseconds for it to complete. Returns true if the shutdown completed successfully before the timeout expired and false if it didn't.
Implemented in TDatagramSocketServer, CNamedServerCollection, CServerCollection, TStreamSocketServer, TStreamSocketServerEx, and TStreamSocketServerEx< TStreamSocketConnectionManager< CFilteringStreamSocketConnectionManagerBase > >.
virtual void ForceShutdown | ( | ) | [pure virtual] |
If a shutdown is hung due to sockets still being active then you can force a shutdown to complete by calling this function. Note: USE WITH CARE!!! The usual usage pattern is to call WaitForShutdownToComplete() with a timeout and if that fails then to call ForceShutdown() to allow the object in question to be destroyed (in general the object would call WaitForShutdownToComplete() in its destructor and hang there!).
Implemented in TDatagramSocketServer, CNamedServerCollection, CServerCollection, TStreamSocketServer, TStreamSocketServerEx, and TStreamSocketServerEx< TStreamSocketConnectionManager< CFilteringStreamSocketConnectionManagerBase > >.
virtual Status GetStatus | ( | ) | const [pure virtual] |
Returns the status of the server.
Implemented in TDatagramSocketServer, CNamedServerCollection, CServerCollection, TStreamSocketServer, TStreamSocketServerEx, and TStreamSocketServerEx< TStreamSocketConnectionManager< CFilteringStreamSocketConnectionManagerBase > >.
_tstring GetStatusAsString | ( | Status | status | ) | [static] |