sock = new Socket(hostName, portNo);
But it takes a lot of time??(even 4 to 5 seconds)
Is there any other way so that the statement is executed quickly.
I do this to test whether the service is running on the host machine or not.I calculate the response time by the difference of the opening and closing time of the socket.Since the time for opening and closing the socket is very high.response time is very high.Is ther any to free the sockets before opening them or any other method to be executed.
Please help.Looking forward to your reply