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 '17 at 10:26

chilkat's gravatar image

chilkat ♦♦

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.)


answered Oct 05 '17 at 10:33

chilkat's gravatar image

chilkat ♦♦

edited Oct 05 '17 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



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



Asked: Oct 05 '17 at 10:26

Seen: 2,563 times

Last updated: Oct 05 '17 at 10:34

powered by OSQA