I want to run C++ server code using session in Poco library.
Is it possible add_url_rule in cpp like python flask application ?
In my case I send the data using python and receiving data using C++ as well as
Python Client:
import numpy as np
import requests
import random
import copy
import yaml
import time
if __name__=="__main__":
while TRUE:
total_data={}
total_data["data1"] = random.uniform(2.3, 2.5)
total_data["data2"] = random.uniform(2.2, 2.4)
total_data["data3"] = random.uniform(2.0, 2.2)
data = copy.deepcopy(total_data)
if data:
res=requests.post(
"http://127.0.0.1:4001" + "/parameters",
json=data,
)
time.sleep(0.01)
C++ Server:
https://www.codeproject.com/Articles/252827/Learning-Poco-A-Simple-HTTP-Server
Changing port number in C++ Server I am getting data.
but I want to add_url_rule like python and get the data in CPP. like below
https://stackoverflow.com/questions/19261833/what-is-an-endpoint-in-flask
or Creating session and Use that session for sending as well as receiving the data in C++.