Example #1
0
 /**
  * ( begin auto-generated from Server_disconnect.xml )
  *
  * <p>Disconnect a particular client.
  *
  * <p>( end auto-generated )
  *
  * @brief Disconnect a particular client.
  * @webref server:server
  * @param client the client to disconnect
  */
 public void disconnect(Client client) {
   client.stop();
   int index = clientIndex(client);
   if (index != -1) {
     removeIndex(index);
   }
 }
Example #2
0
 /**
  * Stop a RPC client connection A RPC client is closed only when its reference count becomes
  * zero.
  */
 private void stopClient(Client client) {
   synchronized (this) {
     client.decCount();
     if (client.isZeroReference()) {
       clients.remove(client.getSocketFactory());
     }
   }
   if (client.isZeroReference()) {
     client.stop();
   }
 }