void StartListeningServer() { Serial.println("listening server"); CAResult_t ret = CAStartListeningServer(); if(ret != CA_STATUS_OK) { Serial.print("listening failed: "); Serial.println(ret); return; } }
void start_listening_server() { printf("start listening server!!\n"); CAResult_t res = CAStartListeningServer(); if (CA_STATUS_OK != res) { printf("start listening server fail, error code : %d\n", res); } else { printf("start listening server success\n"); } }
JNIEXPORT void JNICALL Java_org_iotivity_ca_service_RMInterface_RMStartListeningServer(JNIEnv *env, jobject obj) { LOGI("RMStartListeningServer"); if (!env || !obj) { LOGI("Invalid input parameter"); return; } if (CA_STATUS_OK != CAStartListeningServer()) { LOGE("Could not start Listening server"); } }
// CAStartListeningServer TC // check return value TEST(StartListeningServerTest, DISABLED_TC_03_Positive_01) { CASelectNetwork(CA_ADAPTER_IP); EXPECT_EQ(CA_STATUS_OK, CAStartListeningServer()); }
// CAStartListeningServer TC TEST_F(CATests, StartListeningServerTest) { EXPECT_EQ(CA_STATUS_OK, CASelectNetwork(CA_ADAPTER_IP)); EXPECT_EQ(CA_STATUS_OK, CAStartListeningServer()); }
// CAStartListeningServer TC TEST_F(CATests, StartListeningServerTestWithNonSelect) { EXPECT_EQ(CA_STATUS_FAILED, CAStartListeningServer()); }