473,386 Members | 1,748 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,386 software developers and data experts.

Client Socket Shutdown is not visible on the Server Socket

I have two apps. Client and Server (both are windows console apps).

Im using Client Socket of this definition AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp
and Im using async communication with the Server Socket.
I have no opened NetworkStream.

In case, I kill my client application (via red cross) the server application
can see, that client has been disconnected.
In case, I shutdown the client socket and close it on the client side, and
then close my client apps, the server cannot see, that the client
application has been disconnected.
WHY???

Thanks
ME

Nov 5 '07 #1
1 1862
On 2007-11-05 00:22:52 -0800, "Miroslav Endys" <ne**@endys.czsaid:
[...]
In case, I kill my client application (via red cross) the server
application can see, that client has been disconnected.
In case, I shutdown the client socket and close it on the client side,
and then close my client apps, the server cannot see, that the client
application has been disconnected.
WHY???
Are you actually calling Socket.Shutdown()?

It's not really possibly to answer your question without seeing the
code you wrote. For specific advice, you should post a
concise-but-complete sample of code that reliably demonstrates the
problem.

"Concise" means you only include the minimum code required, and
"complete" means you post enough code to compile and run without any
addition effort on someone else's part.

Pete

Nov 5 '07 #2

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

Similar topics

4
by: Herbert VON GRÜNENWALD | last post by:
hi everyone, i've made a client/server class in C++ and some other to do the same thing in c#. clients and server works fine, in the two langages, but there is one problem when a c++ client...
0
by: Usman | last post by:
Hi I'm having problem with a scenarion where I have a server written in C# and client written in VC6++. Here is the server code that i'm using including the Callback function for handling...
2
by: Macca | last post by:
My app has an asynchronous socket server. It will have 20 clients connected to the server. Each client sends data every 500 millisecondsThe Connections once established will not be closed unless...
9
by: diffuser78 | last post by:
My server.py looks like this ---------------------------------------------CODE---------------------------------- #!/usr/bin/env python import socket import sys import os s =...
4
by: =?Utf-8?B?U2hhdW5P?= | last post by:
Hi, I set up an client to asynchronously receive data from it's connection. When i'm finished, i close the client using try {...
14
by: ahlongxp | last post by:
Hi, everyone, I'm implementing a simple client/server protocol. Now I've got a situation: client will send server command,header paires and optionally body. server checks headers and decides...
2
by: ppuniversal | last post by:
Hi everyone, I have made a client-server code in Linux. The server is running properly and is sitting at its accept() method. But the client is unable to connect to the server. The Server and Client...
6
by: 7stud | last post by:
My question pertains to this example: #!/usr/bin/env python import socket, sys, time host = sys.argv textport = sys.argv s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
7
by: Anil | last post by:
I have a Javascript program which runs in the browser and has functions work(), and stop(). It listens to commands from the server to work() and can be interrupted by the server to stop(). I am...
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:
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...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
jinu1996
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...

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.