473,547 Members | 2,653 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

xmlrpclib, testing server presence

I'm employing xmlrpclib for a project at work, and I must say that I'm
quite impressed with its effectiveness and ease of use.

However, I was recently doing some tests when I realized that if the
server was down, the client quite simply hanged (no use of "try ...
except" here) with no error or tracebacks or exceptions whatsoever.

Is there some way in Python of "testing" the presence of the server on
the other end, so as to avoid this situation?

Thank you.
Feb 2 '08 #1
1 1071
On Sat, 02 Feb 2008 00:22:15 -0800, rocco.rossi wrote:
I'm employing xmlrpclib for a project at work, and I must say that I'm
quite impressed with its effectiveness and ease of use.

However, I was recently doing some tests when I realized that if the
server was down, the client quite simply hanged (no use of "try ...
except" here) with no error or tracebacks or exceptions whatsoever.

Is there some way in Python of "testing" the presence of the server on
the other end, so as to avoid this situation?

Thank you.
Hi,

Could you test for a socket timeout?:

socket.setdefau lttimeout(20.0) # timeout = 20.0 secs

regards

Trevor
http://www.infocentrality.co.uk
Feb 2 '08 #2

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

Similar topics

0
1757
by: Larry | last post by:
I've had a production system running for a long time that uses xmlrpclib with timeoutsocket, and with my recent upgrade to 2.3 it's no longer able to use xmlrpclib with the xmlrpc servers I communicate with. I can call remote procedures still, but as soon as I import timeoutsocket and the old socket switcharoo is done it's over. To add to...
0
757
by: sashan | last post by:
Hi I'm having trouble using xmlrpclib. I register a function (or class) with the SimpleXMLRPCServer and initiate the server. I then create a ServerProxy object and connect to the xml-rpc server. When I call a registerd function or class member function I get the follwoing error. I've attached the server and client source files. File...
1
2661
by: Gabriel PASTOR | last post by:
I'm trying to send object using xmlrpclib, but it seems that classes inheriting from object cannot be marshalled. Here is an example: -------- server.py -------- import xmlrpclib, SimpleXMLRPCServer class MyObject(object): def __init__(self,name): self._name=name def getMyObject(name):
0
1637
by: Arno Stienen | last post by:
Perhaps I should be a bit more specific. When using this code to connect to a remote XML-RPC server (C++, xmlrpc++0.7 library): import xmlrpclib server = xmlrpclib.Server("http://10.10.101.62:29500") print server.Connection_Request("roberto") the Python command line 'hangs' until I kill the server. Then, the correct output is suddenly...
0
7510
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7947
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7797
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5362
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5081
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3473
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1923
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1050
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
748
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.