Hi Folks,
I'm using c# to create a server client application.
I have to check if the socket is in"CLOSE_WAIT" state. Anyone knows any
solution for this?
I tried to used Socket.Connected but it doesn't give a false message if the
socket is in "CLOSE_WAIT" state.
Thanks
Laszlo 4 1566
I would be interested in knowing the solution too. I had the same problem.
What I ended up doing is timestamping the last time the client sent data and
if the client is idle for a certain period of time(10 minutes), close the
connection from the server end.
Thanks
Srinivas
"Laszlo Csabi" <lc@ynotcallme.com> wrote in message
news:O1**************@TK2MSFTNGP12.phx.gbl... Hi Folks,
I'm using c# to create a server client application. I have to check if the socket is in"CLOSE_WAIT" state. Anyone knows any solution for this?
I tried to used Socket.Connected but it doesn't give a false message if the socket is in "CLOSE_WAIT" state.
Thanks
Laszlo
Hello,
I have had the same problem. I have narrowed it down to a server side
problem. The server does not seem to be closing the connection properly.
I have tried some commericial socket controls to see how they work, and they
do not leave the clients in a CLOSE_WAIT. May have to go with a commerical
control.
Good luck.
"SRLoka" wrote: I would be interested in knowing the solution too. I had the same problem. What I ended up doing is timestamping the last time the client sent data and if the client is idle for a certain period of time(10 minutes), close the connection from the server end.
Thanks Srinivas
"Laszlo Csabi" <lc@ynotcallme.com> wrote in message news:O1**************@TK2MSFTNGP12.phx.gbl... Hi Folks,
I'm using c# to create a server client application. I have to check if the socket is in"CLOSE_WAIT" state. Anyone knows any solution for this?
I tried to used Socket.Connected but it doesn't give a false message if the socket is in "CLOSE_WAIT" state.
Thanks
Laszlo
Thanks. Can you list a few that you have tried ?
I think its something to do with .Net . Even if the cleint disconnects, the
Write does not throw an exception and Can Write is still true.
"MisterT" <Mi*****@discussions.microsoft.com> wrote in message
news:11**********************************@microsof t.com... Hello,
I have had the same problem. I have narrowed it down to a server side problem. The server does not seem to be closing the connection properly.
I have tried some commericial socket controls to see how they work, and they do not leave the clients in a CLOSE_WAIT. May have to go with a commerical control.
Good luck.
"SRLoka" wrote:
I would be interested in knowing the solution too. I had the same problem. What I ended up doing is timestamping the last time the client sent data and if the client is idle for a certain period of time(10 minutes), close the connection from the server end.
Thanks Srinivas
"Laszlo Csabi" <lc@ynotcallme.com> wrote in message news:O1**************@TK2MSFTNGP12.phx.gbl... > Hi Folks, > > I'm using c# to create a server client application. > I have to check if the socket is in"CLOSE_WAIT" state. Anyone knows > any > solution for this? > > I tried to used Socket.Connected but it doesn't give a false message if > the socket is in "CLOSE_WAIT" state. > > Thanks > > Laszlo > >
Hello,
The Dart TCP Socket .NET control works great. It costs $249. IP Works
also has a good one, but it costs $399.
I have seen other posts on the internet where people are frustrated with the
..NET Socket offering.
Thanks
"SRLoka" wrote: Thanks. Can you list a few that you have tried ? I think its something to do with .Net . Even if the cleint disconnects, the Write does not throw an exception and Can Write is still true.
"MisterT" <Mi*****@discussions.microsoft.com> wrote in message news:11**********************************@microsof t.com... Hello,
I have had the same problem. I have narrowed it down to a server side problem. The server does not seem to be closing the connection properly.
I have tried some commericial socket controls to see how they work, and they do not leave the clients in a CLOSE_WAIT. May have to go with a commerical control.
Good luck.
"SRLoka" wrote:
I would be interested in knowing the solution too. I had the same problem. What I ended up doing is timestamping the last time the client sent data and if the client is idle for a certain period of time(10 minutes), close the connection from the server end.
Thanks Srinivas
"Laszlo Csabi" <lc@ynotcallme.com> wrote in message news:O1**************@TK2MSFTNGP12.phx.gbl... > Hi Folks, > > I'm using c# to create a server client application. > I have to check if the socket is in"CLOSE_WAIT" state. Anyone knows > any > solution for this? > > I tried to used Socket.Connected but it doesn't give a false message if > the socket is in "CLOSE_WAIT" state. > > Thanks > > Laszlo > > This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Thomas Hervé |
last post by:
My problem is not really python specific but as I do my implementation
in python I hope someone here can help me.
I have two programs that talk through a socket. Here is the code :
<server>...
|
by: Bryan Olson |
last post by:
Here's the problem: Suppose we use:
import socket
f = some_socket.makefile()
Then:
f.read() is efficient, but verbose, and incorrect (or at
least does not play will with others);
|
by: faktujaa |
last post by:
Hi,
I am having some problem with callback used in socket implementation.
private static void Connect(string strPrtrIPAddr, int intPrtrPort, ref
Socket rsocClient)
{
try
{
// Create remote end...
|
by: zbcong |
last post by:
Hello:
I write a multithread c# socket server,it is a winform application,there is a richtextbox control and button,when the button is click,the server begin to listen the socket port,waiting for a...
|
by: Chris Tanger |
last post by:
Context:
C#
System.Net.Sockets
Socket created with constructor prarmeters Internetwork, Stream and TCP
everything else is left at the default parameters and options except linger
may be changed...
|
by: Sašo Zagoranski |
last post by:
Hi!
I'm writing a simple 3D First person shooter game. It is a multiplayer
game, where all the players connect
to one server.
|
by: atlaste |
last post by:
Hi,
In an attempt to create a full-blown webcrawler I've found myself
writing a wrapper around the Socket class in an attempt to make it
completely async, supporting timeouts and some scheduling...
|
by: ahlongxp |
last post by:
socket.makefile() may lose data when "connection reset by peer".
and socket.recv() will never lose the data.
change the "1" to "0" in the client code to see the difference.
confirmed on both...
|
by: george585 |
last post by:
Hello!
I am new to network programming, and understand just basics. Using some sample code, and having read documentation, I managed to create a simple app in C# and VB.NET. The application is...
|
by: =?iso-8859-1?q?|-|e|=5F|=5F_B0=DD?= |
last post by:
hi all!
I got a problem. I declared a SOCKET var in my C program but when i
compiled the program it displayed like
*--------------------------------------------------------------*
*'SOCKET':...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
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...
|
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
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |