Python Forum
Checking connectivity for sockets in Python
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Checking connectivity for sockets in Python
#1
I want to check the connection between my client and server ie. should know as soon as the connection is cut off. I tried settimeout( ) but it gave "timed_out" message whenever the application in my client was idle. Any ideas on what function I can use here??? Sad
Reply
#2
In TCP/IP there is no "connection" (in the sense of a permanent link...). You cannot tell that there is no path between the client and the server unless the client tries to access the server. This is usually done with a "heartbeat" routine, that does a regular trivial request to the server. But the heartbeat can report very temporary losses of contact that the client wouldn't notice.
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python Jira Connectivity Shyam 0 171 Mar-19-2024, 05:43 PM
Last Post: Shyam
  Python sockets : Client sending to the server nico31780 0 2,276 May-17-2020, 07:56 PM
Last Post: nico31780
  Mysql-Python Connectivity Error aryamanurs 2 3,374 Apr-29-2020, 02:21 PM
Last Post: aryamanurs
  Checking Hyperthreding status on python Fletcher 0 1,545 Apr-19-2020, 11:45 PM
Last Post: Fletcher
  Error in Database connectivity with python3.7 srm 8 4,412 May-13-2019, 07:28 AM
Last Post: srm
  New to Python, please help with checking Azure SQL DB for a table TommyAutomagically 4 2,711 Apr-25-2019, 08:35 PM
Last Post: Gribouillis
  Python-Hive connectivity issue rekhagaonkar 0 4,375 Mar-05-2019, 07:01 AM
Last Post: rekhagaonkar
  Sockets confusion! MuntyScruntfundle 1 2,184 Oct-16-2018, 07:18 PM
Last Post: Larz60+
  Why is basic Twitter Connectivity So Difficult? Not sure what I'm doing wrong. Oliver 0 1,856 Mar-10-2018, 12:38 PM
Last Post: Oliver
  Array of Listening Sockets abarnes 1 2,583 Sep-28-2017, 07:26 PM
Last Post: abarnes

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020