Hi, When we use c++ API to write some codes, How can we know that a connection is ok or has been closed?