Can I generate an async request/response using bootstrap?

  • Now a days, I'm integrating an open source tool called "Nmap" (network mapper) with OpenDXL. The client generated with opendxl-bootstrap template, wait some seconds for a response after sending a request, and probably this tool it is slower to generate a report about network status. So for that reason, the client lost the connection.

  • Camila,

    If your request is timing out, you can try increasing the timeout of the sync_request as shown below.

    1. res = client.sync_request(req, timeout=60). # This will wait for 60 seconds to get a response

    If the above does not work and you want to make an async_request , you have to create a callback and invoke it as shown below

    1. client.async_request(request, MyResponseCallback())

    For more details look at this example of invoking an async_request.

    The bootstrap currently only has sync_request but it is not hard to modify your code to make it async.