473,378 Members | 1,420 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Disconnecting TcpClient in CLOSE_WAIT state

I have a Client (a TcpClient object) established connection with the Server(a TcpListener). I want that when the Server goes down, the TcpClient detects this disconnection and when the Server is back up, client is able to establish connection again with the server.

However when my server goes down, client socket goes in CLOSE_WAIT state
and when server comes back and tries to reconnect server socket goes into FIN_WAIT state... can I not use the same objects on both sides to reconnect?

I am using TcpClient.Close() to disconnect and have set it's LingerState option to false but why it infinitely goes into CLOSE_WAIT state?
Nov 16 '05 #1
0 4398

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: tom | last post by:
Hi all, I hope I can explain my problem clearly. I have a .NET c# windows application calling a localhost web service using asynchronous callback. While still waiting for the result, the user...
2
by: Daniel | last post by:
TcpClient close() method socket leak when i use TcpClient to open a connection, send data and close the TcpClient with myTcpClientInstance.Close(); it takes 60 seconds for the actual socket on...
6
by: Claire | last post by:
When i close a client connection by using System.Net.Sockets.TcpClient.Close() method it remains open and viewable with netstat -an. public void Disconnect() { if (myClient == null) return;...
8
by: Claire | last post by:
I'm trying to debug my network application ie I want to check my error handling when the connection is broken. Im using 127.0.0.1 as the connection address. Unfortunately, the client socket goes...
7
by: David Dvali | last post by:
How can I check if TcpClient is connected (or not connected)?
0
by: Holger Steinestel | last post by:
Hello, I have a problem with the TCPClient class. After closing the connection with the Close() method, the connection on the Linux server remains open with the CLOSE_WAIT status. I found...
1
by: Frank | last post by:
I wonder if anyone could give me a suggestion on how to best handle this scenario. I wish to have an aspx page contact a server and receive messages. Initially, a login messge is sent, then...
1
by: kash123 | last post by:
Hi All, I have written an application, a part of which, in the application, is a socket server programe accepting connection requests from socket clients. My server code typically contains, ...
1
by: tvnaidu | last post by:
I have receiver socket on 8901 and sender socket on 9801, I can see receiver quue going up and state "CLOSE_WAIT" and sender Connection established, but receiver side an error, any idea?. tcp ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.