473,698 Members | 2,554 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with using asynchat with the Spread toolkit

2 New Member
Hi all,

I will try to be as clear as possible with my application, maybe ppl familiar with asyncore can help me out :-) Basically, I have python 2.5 in SuSe running with a server written using asynchat. I use it to connect to several clients inside the asyncore.loop construct.

This part of the application works fine. However, along with talking to clients through sockets, I need to talk to some Spread groups, obviously using spread. My problem is that all of my spread communication called from a single poll, and my spread implementation is blocking. I'm looking for a way to have the asyncore loop coexist with my spread polling function.

The end result would be, for instance, getting a spread message, and writing it to the appropriate specified socket. Alternatively, I'd like to be able to get spread messages while servicing a socket. Is there a way to do this without queues?

Thanks for everyone's help!
Feb 25 '08 #1
0 1134

Sign in to post your reply or Sign up for a free account.

Similar topics

0
2696
by: Michael Welsh | last post by:
In order to learn sockets in Python I am trying to write a simple group chat server and client. I need a little nudge, please. My question contains some GUI but only as decoration. The root question is asyncore / asynchat. I have read that twisted makes this all simple, but, I wanted to get my hands dirty here for educational purposes. I've managed to build a small echo server with asyncore and asynchat that can handle any number of...
4
3013
by: Joshua Moore-Oliva | last post by:
Ok.. so here is my situation. I have an application that I would love to be able to use asynchat with for it's handle_close, found_terminator etc abstraction on. However, I must use a separate thread for each connection as the work resulting from the communication can result in blocking for an indefinate period of time. What I would love to do for each thread that is created, is to spin off an asynchat subclass and manually run some...
16
3264
by: Rob Snyder | last post by:
Greetings - I've embarked on a small learning project, trying to get a better grasp of the asyncore and asynchat modules. The project involves building a simple instant messenger application for use on our LAN - nothing heavy duty, as 99% of my reason for doing this is just to learn. I got my server portion working well, and I think I understand the basics. Where I'm getting stuck is on the client side, where I'm trying to involve...
0
1233
by: rix | last post by:
Hi there, I am writing an application that requires a client-server interaction. Looking up on the internet and working on it I came up with something like this: a class ADFSServer that takes inbound connections and dispatches them to ADFSReceiver. The connection is always initialized by ADFSSender. here is the code: import asynchat
2
1486
by: Andreas R. | last post by:
Hello, I'm using Python's asynchat for networking. If I invoke the send() method of the asynchat module, only a single send operation is possible at any given time. If I call it more than once, only the first call is registered at the other client. So how do I fix this? Do I have to use select etc.? The source code is here:
8
2594
by: Andreas R. | last post by:
Hi again, I'm using Python's asynchat module for networking. When calling the sendall() method of asynchat, I sometimes get the error message "the operation could not complete without blocking". So how do I enable blocking with synchat, or otherwise fix this error? Thanks for the help I've received with asynchat so far in this news group.
4
2160
by: billie | last post by:
Hi all. I'm (re)writing an FTP server application by using asyncore/asynchat modules. FTP tipically got two different channels: command and data. I'm succesfully managing command channel through asynchat framework, but I'm not sure about how to manage data channel without using a thread/subprocess. Is there an optimal to do that? Can anyone point me in the right direction?
10
2277
by: Rahul | last post by:
Friends, My Problem is related to writing a text file from a database using .Net. in a particular string format. I have a dataset with a table, let suppose in this table there are three fields. - Code - Description - Amount
0
1164
by: Orestis Markou | last post by:
Hello, I'm trying to add some better error handling to an async_chat client. What I want is to retry or terminate gracefully if the connection to the server doesn't succeed. Here's what I have: import asyncore, asynchat, socket class http_client(asynchat.async_chat):
0
8612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9032
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8880
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7743
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5869
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3053
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
2
2342
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.