Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 

Code Block
languagecpp
themeConfluence
EdmiError edmiTerminateClient(SdaiString   password,
                               SdaiClientId clientId, 
                               SdaiInteger  options);

Disconnects a client from the EDM Server.
For various reasons, such as system maintenance, it may be necessary to disconnect all clients from an EDM Server. When you try to disconnect a client from the EDM Server, you must give the superuser password.
The client may be terminated in two ways. Either by telling the client to disconnect the next time it sends a request to the EDM Server, or by simply killing the connection and leave it to the client to sort out any problems.
To prevent the clients to reconnect, use edmiSetUnavailable. Related functions: edmiResetClient, edmiSetUnavailable
Header:
#include "sdai.h"
Prototype:
EdmiError edmiTerminateClient(SdaiString   password,
                               SdaiClientId clientId, 
                               SdaiInteger  options);
Arguments:

 

Arguments

...

TypeNameComment
SdaiString

Password

The password of the superuser.

SdaiClientId

ClientId

The client Id of the connection to terminate

SdaiInteger

Options

One of the options listed below.

...

Return Value

...

Insert excerpt
US:_r_EDMInterface
US:_r_EDMInterface
nopaneltrue

Options

...

 

alloved completeany
OptionComment

KILL_CLIENT

The client will be inmediately disconnected. Ongoing tasks will be aborted and rolled back. The client will receive the error message edmiE_STOPPED

FORCE_TO_TERMINATE

Tell the client to disconnect the next time he sends a request to the EDM Server. Any ongoing tasks will be

allowed to

complete any succeeding requests will result in the error message edmiE_FORCE_DISCONNECT

...

Example

...

 

Code Block
languagecpp
 EdmiError rstat;
 SdaiClientId clientId;
 SdaiString hostName;
 SdaiString s;
 SdaiUnsignedInt key;
 ...
 if (rstat = edmiGetClientId("Johnny", &clientId, &hostName)) {

...


 goto error;

...

 
 }
 edmiChangeMyUser("superuser", "", "gZw76Ab", &s, &key);

...


 edmiSetUnavailable("Sorry Johnny!! You're out!");

...


 if (rstat = edmiTerminateClient("gZw76Ab", clientId, KILL_CLIENT)) {

...


 printf("\nError %d in edmiTerminateClient: %s", rstat

...


 edmiGetErrorText(rstat));

...

 
 goto error;

...

 
 }
 printf("\nKilled johnny@%s", &hostname);

...


 . . .

 

See also

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "model" and parent = "6062220"