Ejemplo n.º 1
0
// Called when data is received on client (incoming connection)
void handle_client_on_read(Connection_ptr python, const std::string& request) {
  printf("Received [Client]: %s\n", request.c_str());
  // Write the request to our python server
  python->write(request);
}
Ejemplo n.º 2
0
// Called when data is received on python (outgoing connection)
void handle_python_on_read(Connection_ptr client, const std::string& response) {
  // Write response to our client
  client->write(response);
}
Ejemplo n.º 3
0
// Called when data is received on python (outgoing connection)
void handle_python_on_read(Connection_ptr client, std::string response) {
  // Write response to our client
  client->write(response.data(), response.size());
}