Sign in to follow this  
Followers 0
Hellouser

Need Help on Socket

3 posts in this topic

Hi All

Good Evening , Need a help.

Is it possible to find the status of a TCP socket ? Whether it is closed or alive.

Situation

When a client suddenly looses its connection to the internet or intranet, will it possible to detect such sockets.?

Any help much appreciated.

Thanks.

Share this post


Link to post
Share on other sites



All you had to do is describe the situation, but instead you insist on a weird implementation.

The easiest method for your situation is to ping an external address (like google.com) and see if it fails or not, you can do this with all native AutoIt commands and will be a few lines long.

Share this post


Link to post
Share on other sites

Thanks Manadar

For the quick reply.

I will describe the situation , where i am getting stuck.

I am having a client server application , the server is running on Asynchronous tcp socket method and it's having n number of clients connected.The server can read/write and do all other kinds of requests as usual but when a client suddenly disconnects ,the server application is not able to detect such kinds of sockets.So next time the same client connect back to the server ,the server application will treat the same client as a new connection.This creates a duplicate sockets.

All i want is to detect and remove such kinds of sockets in the server application immediately when the client disconnects.

Please help me

Any help much much appreciated.

Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0