Jump to content

Need Help on Socket


 Share

Recommended Posts

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.

Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...