{
std::cout<< " Usage simpleclientserver <0|1>" << std::endl;
std::cout<< " ConnectivityType: Default IP" << std::endl;
- std::cout << " ConnectivityType : 0 - IPv4" << std::endl;
- std::cout << " ConnectivityType : 1 - IPv6 (Currently Not Supported)" << std::endl;
+ std::cout << " ConnectivityType : 0 - IP" << std::endl;
}
class ClientWorker
{
private:
- void putResourceInfo(const HeaderOptions& headerOptions,
- const OCRepresentation rep, const OCRepresentation rep2, const int eCode)
+ void putResourceInfo(const HeaderOptions& /*headerOptions*/,
+ const OCRepresentation rep, const OCRepresentation /*rep2*/, const int eCode)
{
std::cout << "In PutResourceInfo" << std::endl;
std::cout <<"Clientside Put response to get was: "<<std::endl;
std::cout <<"ErrorCode: "<<eCode <<std::endl;
- if(eCode == 0)
+ if(eCode == OC_STACK_OK || eCode == OC_STACK_RESOURCE_CHANGED)
{
std::cout<<"Successful Put. Attributes sent were: "<<std::endl;
}
}
- void getResourceInfo(const HeaderOptions& headerOptions, const OCRepresentation rep,
+ void getResourceInfo(const HeaderOptions& /*headerOptions*/, const OCRepresentation rep,
const int eCode)
{
std::cout << "In getResourceInfo" << std::endl;
void start()
{
std::ostringstream requestURI;
- requestURI << OC_MULTICAST_DISCOVERY_URI << "?rt=core.foo";
+ requestURI << OC_RSRVD_WELL_KNOWN_URI << "?rt=core.foo";
std::cout<<"Starting Client find:"<<std::endl;
FindCallback f (std::bind(&ClientWorker::foundResource, this, std::placeholders::_1));
{
if(optionSelected == 0)
{
- std::cout << "Using IPv4."<< std::endl;
- connectivityType = CT_IP_USE_V4;
- }
- else if(optionSelected == 1)
- {
- std::cout << "IPv6 is currently not supported."<< std::endl;
- printUsage();
- return -1;
- //TODO: printUsage to be removed when IPv6 is available.
- //connectivityType = CT_IP_USE_V6;
+ std::cout << "Using IP."<< std::endl;
+ connectivityType = CT_ADAPTER_IP;
}
else
{