Service Virtualization

 View Only

How to keep a socket connection with a stub alive?

  • 1.  How to keep a socket connection with a stub alive?

    Posted Oct 24, 2019 01:23 AM
    Hi Everyone,
    There is a need for us have an active TCP connection between the HTTP request generating server/socket and the DevTest stub. The incoming request has the 'Connection:Keep-Alive' value in the header. However in the response from the stub, I do not see a a similar value generated by Lisa. For the subsequent call to the Lisa stub, a new socket connection is established from the server. Multiple requests go to the stub in a span of 10ms, which requires the connection to be alive. Currently it appears to not happen and is resulting in a failure on the server after the first call. The same server works fine when connected to an actual system instead of the stub. When I searched the community, found the following article @Shiney Abraham https://community.broadcom.com/communities/community-home/librarydocuments/viewdocument?DocumentKey=735d5824-408b-4fd3-8d04-716d414a700d

    Tried the following:
    1) Added Connection:Keep-Alive in the header of the response. This did not make a difference.
    2) Added a forced delay of 1 sec on the server between the first and the second calls to the stub, it works fine.

    All the requests and responses are HTTP/1.1

    Any inputs from the members appreciated :)​​