I have a third-party app running on the server, which certifies clients and reactions back.
My problem here is for every and every request, which I get in my train app, I need to establish a TCP connection and get the data. Is it possible to have a consistent connection so that I can reduce the overhead in setting up the connection
I hope you are using a Ruby socket I think you might have a way that would return a connection object. There may be a class variable for your connection object. The method will check that the connection will return again, create new
self.get_connection return @@ conObj if @@ conObj return @@ conObj = TCPSocket :: new ("192.168.1.1", 100) End I'm not sure, but it can help you.
Comments
Post a Comment