login about faq

Is there a way to keep a socket open until I close it? The socket seems to close after a while...

asked Oct 05 at 10:26

chilkat's gravatar image

chilkat ♦♦
12.8k317366475


The answer is that Chilkat never takes a decision unto itself to close a socket. If you establish a TCP connection with a peer, unless your application specifically closes the connection, it will stay open -- assuming the peer does not take action to close the connection. (Note: TLS and SSH are just layers on top of TCP.)

A decision made by the connected peer (server) to close a connection entirely depends on the behavior of the server. For example, maybe it's an HTTP server that keeps a connection open after receiving a GET request, and then will decide after some period of inactivity to close the connection. The same can be said for FTP servers, email servers, SSH servers, etc., and the same can be said for any custom application acting as the peer in your connection.

But Chilkat never decides upon itself to just close a connection. The fact that Chilkat is an API (not an application) means that the behavior is under your control. (But of course, you cannot control the server's behavior.)

link

answered Oct 05 at 10:33

chilkat's gravatar image

chilkat ♦♦
12.8k317366475

edited Oct 05 at 10:34

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×81
×13
×1

Asked: Oct 05 at 10:26

Seen: 173 times

Last updated: Oct 05 at 10:34

powered by OSQA