473,396 Members | 1,968 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Mark Hammond's pipe service

Hello to all,

I'm trying to reproduce the PipeService1 from Mark Hammond's "Python
programming on win32" (which you can get on M. Hammond web site, in the
sample package, chapter 18). I googled this but there's not much posts
about this topic.

I'm trying to use the Service frame in that example but using the
SocketServer module to manage the socket connections. Specifically, the
SocketServer.ThreadingTCPServer seem to do the job and since it's
working right out of the box, I rather use this then write my own. My
problem is that in the example, within the infinite loop any
deamon/service must have, the script is actually waiting for either of
two events to occur before it'll move: the first one to stop the
service, the second one is used to tell the process that a client is
waiting. I'm ok with the stopping event. But unless I use the win32pipe
module, I don't see any way I could tell my script there's a client
knocking at the socket. But if so, I can't use the ThreadingTCPServer
and I must manage my connections by myself.

The idea I have is to start a thread in which the ThreadingTCPServer
would run but I'm not sure about what will happen when the service will
be stop. Will all that sub-threads be killed? If so I'm ok with it.

If you have any other idea, I'm all open....
Thx
Guilligan

ps : I'm new to this group so please accept my apologies if I don't
respect any rule about how to send post or anything. I couldn't find any
site containing any such indication.
Feb 8 '06 #1
0 970

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

Similar topics

0
by: Bernhard Kuemel | last post by:
Hi! I want to read/write commands and program input to/from /bin/bash several times before I close the stdin pipe. However, reading from cat hangs unless I first close the stdin pipe. <?php...
1
by: jenny | last post by:
Hi, I have a java socket program running on AIX 4.3.3.0 platform. It opens a socket and sends data to our customer over a leased fractional T1 line. The line is always connected. However,...
5
by: richard | last post by:
I have a simple test to pass information from a client to a server using named pipe. what I really want is: when I type a line on the client, the server will output the line immediately. but to my...
7
by: Greg | last post by:
I am trying to implement the UNIX pipe command using C but with the "->" operator. Everything works fine with 1 pipe, but when I try to use 2 or more, it hangs up when reading the pipe_in...
1
by: Lewap | last post by:
Hi! I've piece of code like follow: <code> LPTSTR lpszPipename = (LPTSTR) "\\\\.\\pipe\\testpipe"; hPipe = CreateNamedPipe(
3
by: a | last post by:
Hi everybody, Is it possible to open a named pipe from a php script on Windows? More specifically, I have a Windows service that receives commands through a named pipe, and I'd like to open...
2
by: Steve R. Hastings | last post by:
While studying iterators and generator expressions, I started wishing I had some tools for processing the values. I wanted to be able to chain together a set of functions, sort of like the...
1
by: Tomislav | last post by:
Does anyone know what pipe.log is? I made windows service that works fine on win xp, when I install them on windows 2003 it make log in windows\temp folder with name pipe.log and it grows rapidly...
2
by: cfriedalek | last post by:
OK, I've asked this earlier this week with no response. Since then I've also received a suggestion from the app developers but that failed with the same type error problem. Hopefully Mark Hammond...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...

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.