Questions tagged [disconnect]

A break or interruption in an existing connection, continuum, or process.

A break or interruption in an existing connection, continuum, or process. This can include:

  • Ending a connection to a server
  • Ending a connection to internet
  • Terminating operating system services
  • Removing event handlers from an object
403 questions
12
votes
4 answers

Do TCP sockets automatically close after some time if no data is sent?

I have a client server situation where the client opens a TCP socket to the server, and sometimes long periods of time will pass with no data being sent between them. I have encountered an issue where the server tries to send data to the client, and…
Nick Banks
  • 4,298
  • 5
  • 39
  • 65
11
votes
4 answers

MongoEngine: Close connection

I spent ages trying to find a simple example where MongoEngine was being used and a connection was being closed. Finally figured it out and posting my code.
malla
  • 1,618
  • 1
  • 17
  • 23
11
votes
1 answer

SSH.Net SftpClient: do I need to call Disconnect within using block?

In a code like this using (var sftp = new SftpClient(_host, _userName, _password)) { sftp.Connect(); // Do some work with sftp sftp.Disconnect(); } Is sftp.Disconnect() call necessary or will using block (Dispose/Close/whatever) close…
vkelman
  • 1,501
  • 1
  • 15
  • 25
11
votes
1 answer

WCF - have client check for service availability

I have a client-server system, both sides written by me, and I would like to put the clients in an 'offline' state when the server disconnects/dies, and then automatically bring them back 'online' when the server is available again. For the first…
WillH
  • 2,086
  • 6
  • 23
  • 40
10
votes
1 answer

node.js doesn't send socket on disconnect event

When someone connects to the node server, I keep an array with all the sockets. That way I can broadcast messages to everyone whenever that is needed or loop through the users to count the number of online users, etc. All this works fine, but when a…
Ali Alwash
  • 533
  • 1
  • 6
  • 23
10
votes
2 answers

detecting disconnection from a WiFi access point

I am trying to use a BroadcastReceiver to detect when the phone has disconnected from a WiFi access point. To do this, I registered my BroadcastReceiver in the manifest:
eshayne
  • 915
  • 9
  • 15
10
votes
1 answer

Disconnecting from a weblogic JMS

Right now my disconnection from a weblogic JMS server looks like this import java.util.Hashtable; import javax.jms.*; import javax.naming.*; import javax.transaction.*; import java.util.Vector; import javax.rmi.PortableRemoteObject; import…
jrahme
  • 253
  • 1
  • 12
10
votes
2 answers

How to detect a client disconnect using a named pipe client/server?

I'm learning about named pipes and was playing with the named pipe client and server examples from the MSDN doc: Named Pipe Server Named Pipe Client I modified the client so I can type in messages to the console and have them sent to the server…
Robert Groves
  • 7,574
  • 6
  • 38
  • 50
10
votes
1 answer

Flask sse-stream not terminated after firefox disconnects

I am trying to create a Flask server that streams data to the client using sse. The piece of test-code below seems to do the trick, but I stumbled upon a problem related to handling client disconnects. When using Firefox as the client (versions 28…
mojoritty
  • 153
  • 8
9
votes
6 answers

In Android how do I disconnect a socket?

So I've got a socket that is connected to an outside web address and when it gets a certain message it's supposed to disconnect. I tried calling socket.close() but socket.isConnected() is still true. No luck searching for an answer
user2312638
  • 443
  • 2
  • 6
  • 17
9
votes
1 answer

Managing SQLConnection / Datasnap through client-server disconnects

In my Datasnap client application I use 1 TSQLConnection for my methods and ProviderConnection. The problems arise when the connection is lost. Both TSQLConnection.Connected and TSQLConnection.ConnectionState don't catch this. When my TSQLconnection…
r_j
  • 1,348
  • 15
  • 35
8
votes
3 answers

pyqt disconnect slots. New style

I assign a slot with this. ... self.query = QtGui.QLineEdit(self) self.query.textChanged.connect(lambda: self.makeThread(self.googleSearch())) self.query.returnPressed.connect(lambda: self.launchNavigator(1)) ... but how can I…
fpilee
  • 1,918
  • 2
  • 22
  • 38
8
votes
4 answers

Best practice to detect a client disconnection in .NET?

I'm developing a server in C# which can accept only one client and I need to know when this client is disconnected to be able to accept another connection requests. I'm using a first Socket which continuously listen to connection request with…
cedrou
  • 2,780
  • 1
  • 18
  • 23
8
votes
2 answers

iOS 6 - Bluetooth LE disconnect

Ok what the heck is up with iOS6 and how it handles Bluetooth LE disconnections? Before the device would disconnect immediately but now, for some strange reason, the device waits to disconnect for about 30-60 seconds. I need it to disconnect…
ChrisB
  • 365
  • 2
  • 13
7
votes
2 answers

How to properly detect a client disconnect in servlet spec 3?

I have tried writing to the response, because there is no proper disconnect callback: private boolean write(byte[] output, AsyncContext context) { try { OutputStream stream = context.getResponse().getOutputStream(); …
OvdB
  • 121
  • 1
  • 10
1
2
3
26 27