A
arpamon
Guest
This code is accessible at 127.0.0.1.
But... ...I don't know how to set up to connect from the outside.
How do I do that?
#include <iostream>
#include <cpprest/http_listener.h>
using namespace std;
using namespace web::http;
using namespace web::http::experimental::listener;
int main(){
http_listener listener("http://localhost:13654");
listener.open().then([&listener](){cout << (U("\n start!!\n"));}).wait();
listener.support(methods::GET, [](http_request req){
req.reply(status_codes::OK, U("hello wordl"));
});
while(true);
listener.close();
return 0;
}
Continue reading...
But... ...I don't know how to set up to connect from the outside.
How do I do that?
#include <iostream>
#include <cpprest/http_listener.h>
using namespace std;
using namespace web::http;
using namespace web::http::experimental::listener;
int main(){
http_listener listener("http://localhost:13654");
listener.open().then([&listener](){cout << (U("\n start!!\n"));}).wait();
listener.support(methods::GET, [](http_request req){
req.reply(status_codes::OK, U("hello wordl"));
});
while(true);
listener.close();
return 0;
}
Continue reading...