VTKFIG  0.20.20181114
Easy VTK based in situ visualization
int vtkfig::internals::Communicator::ClientConnect ( const char *  server,
const int  port 
)

Definition at line 54 of file vtkfigCommunicator.cxx.

55  {
56  int rc=0;
57  int iretry=0;
58 
59  while (iretry<client_connect_num_retry && rc==0)
60  {
61  if (iretry)
62  {
63  std::this_thread::sleep_for (std::chrono::milliseconds(client_connect_retry_timeout));
64  }
65  rc=ConnectTo(server,port);
66  iretry++;
67  }
68  if (!rc) return rc;
69 
70 
71  rc=Handshake();
72  if (!rc) throw std::runtime_error("Client handshake failed");
73  return rc;
74  }