本文整理汇总了C++中TcpServer::startListening方法的典型用法代码示例。如果您正苦于以下问题:C++ TcpServer::startListening方法的具体用法?C++ TcpServer::startListening怎么用?C++ TcpServer::startListening使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TcpServer
的用法示例。
在下文中一共展示了TcpServer::startListening方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WiFiCmdRobot_begin
//.........这里部分代码省略.........
if(DNETcK::isInitialized(&status))
{
Serial.println("IP Stack Initialized");
break;
}
else if(DNETcK::isStatusAnError(status))
{
Serial.print("Error in initializing, status: ");
Serial.println(status, DEC);
return -3;
}
}
Serial.println("");
IPv4 ip;
DNETcK::getMyIP(&ip);
Serial.print("My ");
printIP(ip);
Serial.println("");
DNETcK::getGateway(&ip);
Serial.print("Gateway ");
printIP(ip);
Serial.println("");
DNETcK::getSubnetMask(&ip);
Serial.print("Subnet mask: ");
printNumb(ip.rgbIP, 4, '.');
Serial.println("");
DNETcK::getDns1(&ip);
Serial.print("Dns1 ");
printIP(ip);
Serial.println("");
DNETcK::getDns2(&ip);
Serial.print("Dns2 ");
printIP(ip);
Serial.println("");
DWIFIcK::CONFIGINFO configInfo;
if(DWIFIcK::getConfigInfo(&configInfo))
{
Serial.println("WiFi config information");
Serial.print("Scan Type: ");
switch(configInfo.scanType)
{
case DWIFIcK::WF_ACTIVE_SCAN:
Serial.println("ACTIVE SCAN");
break;
case DWIFIcK::WF_PASSIVE_SCAN:
Serial.println("PASSIVE SCAN");
break;
}
Serial.print("Beacon Timeout: ");
Serial.println(configInfo.beaconTimeout, DEC);
Serial.print("Connect Retry Count: ");
Serial.println(configInfo.connectRetryCount, DEC);
Serial.print("Scan Count: ");
Serial.println(configInfo.scanCount, DEC);
Serial.print("Minimum Signal Strength: ");
Serial.println(configInfo.minSignalStrength, DEC);
Serial.print("Minimum Channel Time: ");
Serial.println(configInfo.minChannelTime, DEC);
Serial.print("Maximum Channel Time: ");
Serial.println(configInfo.maxChannelTime, DEC);
Serial.print("Probe Delay: ");
Serial.println(configInfo.probeDelay, DEC);
Serial.print("Polling Interval: ");
Serial.println(configInfo.pollingInterval, DEC);
}
else
{
Serial.println("Unable to get WiFi config data");
return -4;
}
tcpServer.startListening(portServer);
lcd.setCursor(0,1);
lcd.print("End WIFI Init");
Serial.println("");
Serial.println("End WiFiCmdRobot Init");
Serial.println("*********************");
Serial.println("");
return SUCCESS;
}